Skip to content

Commit 64ec50e

Browse files
Copilotdorkmo
andcommitted
Enhance documentation with Arduino IDE setup and 112025 compilation guidance
Co-authored-by: dorkmo <[email protected]>
1 parent 363f88e commit 64ec50e

File tree

2 files changed

+130
-4
lines changed

2 files changed

+130
-4
lines changed

CODE REVIEW/ARDUINO_COMPILATION_GUIDE.md

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This guide helps ensure Arduino sketches compile successfully in the CI workflow and locally.
44

5-
## Quick Verification
5+
## Quick Verification - 092025 (MKR NB 1500)
66

77
To verify your changes compile correctly before committing:
88

@@ -25,6 +25,33 @@ arduino-cli compile --fqbn arduino:samd:mkrnb1500 \
2525
TankAlarm-092025-Server-Hologram/TankAlarm-092025-Server-Hologram.ino
2626
```
2727

28+
## Quick Verification - 112025 (Arduino Opta)
29+
30+
To verify the 112025 sketches compile:
31+
32+
```bash
33+
# Install Arduino CLI (if not already installed)
34+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
35+
export PATH="$PWD/bin:$PATH"
36+
37+
# Setup cores and libraries for Arduino Opta
38+
arduino-cli core update-index
39+
arduino-cli core install arduino:mbed_opta
40+
arduino-cli lib install "[email protected]"
41+
arduino-cli lib install "Blues Wireless Notecard"
42+
arduino-cli lib install "Ethernet"
43+
44+
# Compile Client sketch
45+
arduino-cli compile --fqbn arduino:mbed_opta:opta \
46+
TankAlarm-112025-Client-BluesOpta/TankAlarm-112025-Client-BluesOpta.ino
47+
48+
# Compile Server sketch
49+
arduino-cli compile --fqbn arduino:mbed_opta:opta \
50+
TankAlarm-112025-Server-BluesOpta/TankAlarm-112025-Server-BluesOpta.ino
51+
```
52+
53+
**Note:** LittleFS and Wire libraries are built into the Arduino Mbed OS core and don't need separate installation.
54+
2855
## Common Compilation Issues
2956

3057
### 1. Type Name Errors
@@ -103,18 +130,32 @@ Keep resource usage reasonable:
103130

104131
## Configuration Files
105132

106-
### Client Configuration
133+
### 092025 Configuration (MKR NB 1500)
107134

135+
**Client Configuration:**
108136
- **Template:** `TankAlarm-092025-Client-Hologram/config_template.h`
109137
- **Active:** Include `config_template.h` for compilation (users create their own `config.h`)
110138
- **Tracked:** Only `config_template.h` is in git (config.h is .gitignored)
111139

112-
### Server Configuration
113-
140+
**Server Configuration:**
114141
- **Hardware Config:** `TankAlarm-092025-Server-Hologram/server_config.h` (compile-time hardware constants)
115142
- **SD Card Config:** `TankAlarm-092025-Server-Hologram/server_config.txt` (runtime user configuration)
116143
- **Tracked:** Hardware config.h is in git; SD card .txt template is tracked
117144

145+
### 112025 Configuration (Arduino Opta)
146+
147+
**Client Configuration:**
148+
- **Runtime Config:** `/client_config.json` stored in LittleFS (internal flash)
149+
- **Default config created automatically** on first boot
150+
- **Product UID:** Update `PRODUCT_UID` define in `.ino` file to match Blues Notehub project
151+
- **No SD card required**
152+
153+
**Server Configuration:**
154+
- **Runtime Config:** `/server_config.json` stored in LittleFS (internal flash)
155+
- **Default config created automatically** on first boot
156+
- **Product UID:** Update `SERVER_PRODUCT_UID` define in `.ino` file to match Blues Notehub project
157+
- **No SD card required**
158+
118159
## Troubleshooting
119160

120161
### Local Compilation Works but CI Fails
@@ -130,6 +171,54 @@ Keep resource usage reasonable:
130171
2. Missing hardware-specific libraries
131172
3. Different board variant (check FQBN)
132173

174+
## Common Compilation Issues - 112025 (Arduino Opta)
175+
176+
### 1. ArduinoJson Version Mismatch
177+
178+
**Problem:** `no matching function for call to 'JsonDocument::JsonDocument(int)'`
179+
180+
**Solution:** Ensure you have ArduinoJson version 7.x or later:
181+
- ArduinoJson 7.x uses `JsonDocument` instead of `DynamicJsonDocument`
182+
- Install via Library Manager: Search "ArduinoJson" and install version 7.2.0 or later
183+
- Version 6.x will not work with the 112025 code
184+
185+
### 2. Notecard Library Missing
186+
187+
**Problem:** `Notecard.h: No such file or directory`
188+
189+
**Solution:** Install Blues Wireless Notecard library:
190+
- Open Library Manager
191+
- Search: "Notecard"
192+
- Install: "Blues Wireless Notecard by Blues Inc."
193+
194+
### 3. LittleFS Not Found
195+
196+
**Problem:** `LittleFS.h: No such file or directory`
197+
198+
**Solution:** LittleFS is built into Arduino Mbed OS core:
199+
- Go to **Tools → Board → Boards Manager**
200+
- Search: "Arduino Mbed OS Opta Boards"
201+
- Install the package
202+
- LittleFS will be automatically available
203+
204+
### 4. Wrong Board Selected
205+
206+
**Problem:** `#error "This sketch is designed for Arduino Opta"`
207+
208+
**Solution:** Ensure correct board is selected:
209+
- Go to **Tools → Board → Arduino Mbed OS Opta Boards**
210+
- Select **Arduino Opta**
211+
- FQBN should be: `arduino:mbed_opta:opta`
212+
213+
### 5. Ethernet Library Issues
214+
215+
**Problem:** Ethernet-related compilation errors (server only)
216+
217+
**Solution:**
218+
- Ethernet library should be built-in
219+
- If missing, install via Library Manager: "Ethernet by Arduino"
220+
- Ensure you're compiling the server, not the client (client doesn't use Ethernet)
221+
133222
## Best Practices
134223

135224
1. **Always test locally** before pushing
@@ -139,9 +228,20 @@ Keep resource usage reasonable:
139228
5. **Check resource usage** after adding features
140229
6. **Verify closing braces** match opening ones
141230
7. **Keep sketches modular** with clear function separation
231+
8. **For 112025:** Ensure ArduinoJson 7.x is installed (not 6.x)
232+
9. **For 112025:** Verify Mbed OS Opta core is installed for LittleFS support
142233

143234
## Additional Resources
144235

236+
### 092025 (MKR NB 1500)
145237
- [Arduino CLI Documentation](https://arduino.github.io/arduino-cli/)
146238
- [MKRNB Library Reference](https://www.arduino.cc/reference/en/libraries/mkrnb/)
147239
- [Arduino MKR NB 1500 Documentation](https://docs.arduino.cc/hardware/mkr-nb-1500)
240+
241+
### 112025 (Arduino Opta)
242+
- [Arduino Opta Documentation](https://docs.arduino.cc/hardware/opta)
243+
- [Blues Wireless Notecard Library](https://dev.blues.io/tools-and-sdks/firmware-libraries/arduino-library/)
244+
- [ArduinoJson v7 Documentation](https://arduinojson.org/v7/)
245+
- [Arduino Mbed OS Documentation](https://docs.arduino.cc/learn/programming/mbed-os-basics)
246+
- [Client Installation Guide](../TankAlarm-112025-Client-BluesOpta/INSTALLATION.md)
247+
- [Server Installation Guide](../TankAlarm-112025-Server-BluesOpta/INSTALLATION.md)

QUICK_REFERENCE_FLEET_SETUP.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Quick Reference: Fleet-Based vs Route-Based Setup
22

3+
## Arduino IDE Setup (112025)
4+
5+
### Required Software
6+
- **Arduino IDE** 2.0+ (recommended) or 1.8.x
7+
- **Board Support:** Arduino Mbed OS Opta Boards (via Boards Manager)
8+
9+
### Required Libraries (Install via Library Manager)
10+
1. **ArduinoJson** (version 7.x or later) - JSON parsing
11+
2. **Blues Wireless Notecard** (latest) - Notecard communication
12+
3. **Ethernet** (built-in) - Web server (server only)
13+
4. **LittleFS** (built-in with Mbed core) - File system
14+
5. **Wire** (built-in) - I2C communication
15+
16+
### Installation Steps
17+
1. Install Arduino IDE from [arduino.cc/software](https://www.arduino.cc/en/software)
18+
2. Open **Tools → Boards Manager** → Search "Arduino Mbed OS Opta Boards" → Install
19+
3. Open **Tools → Manage Libraries** → Install libraries listed above
20+
4. Open sketch (.ino file) for client or server
21+
5. Select **Tools → Board → Arduino Opta**
22+
6. Update `PRODUCT_UID` (client) or `SERVER_PRODUCT_UID` (server) to match your Blues Notehub project
23+
7. Compile and upload
24+
25+
**📚 Detailed Instructions:**
26+
- [Client Installation Guide](TankAlarm-112025-Client-BluesOpta/INSTALLATION.md)
27+
- [Server Installation Guide](TankAlarm-112025-Server-BluesOpta/INSTALLATION.md)
28+
329
## At a Glance
430

531
| Aspect | Route-Based (OLD) | Fleet-Based (NEW) ✅ |

0 commit comments

Comments
 (0)