Skip to content

Commit 40269ce

Browse files
author
Z User
committed
feat: massive hardware config expansion - 50+ board configs across 11 platform families
- Arduino: Nano, MKR WiFi 1010, Due, Nano 33 IoT (+ existing Uno/Mega) - ESP: ESP8266 (NodeMCU/D1 Mini), ESP32-C3, ESP32-H2 (+ existing S3/C6) - Jetson: TX2, Xavier NX, Orin NX (+ existing Nano/Orin Nano/AGX Orin) - BeagleBone: Black, AI-64 (NEW platform) - STM32: F7, G0, L4, WL, MP1 (+ existing F4/H7) - Teensy: 4.0, 4.1, 3.6 (NEW platform) - Raspberry Pi: 3B+, 400, CM4, Pico 2 (+ existing 4B/5/Zero W) - NRF52: 52832, 52810, 5340, Mesh config (+ existing 52840) - i.MX RT: 1050, 1060, 1064, 1170 (NEW platform) All 2091 hardware tests passing. SEO-optimized READMEs for all platforms. Board registries for runtime discovery.
1 parent 83e09d0 commit 40269ce

74 files changed

Lines changed: 13591 additions & 128 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

hardware/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
# NEXUS Marine Robotics - Hardware Configuration Package
2+
#
3+
# Supported platforms:
4+
# - Arduino: Uno R3, Mega 2560, Nano, Due, MKR WiFi 1010, Nano 33 IoT
5+
# - ESP32: Classic, S3, C3, C6, H2
6+
# - ESP8266: NodeMCU, Wemos D1 Mini
7+
# - Raspberry Pi
8+
# - NVIDIA Jetson Nano
9+
# - nRF52
10+
# - RP2040
11+
# - STM32

hardware/arduino/README.md

Lines changed: 117 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,23 @@ Arduino boards serve as the primary I/O bridge in the NEXUS architecture, interf
1212

1313
## Supported Arduino Boards
1414

15-
| Board | CPU | Clock | Flash | RAM | UARTs | Digital Pins | Analog Pins |
16-
|---|---|---|---|---|---|---|---|
17-
| **Uno R3** | ATmega328P | 16 MHz | 32 KB | 2 KB | 1 | 14 | 6 |
18-
| **Mega 2560** | ATmega2560 | 16 MHz | 256 KB | 8 KB | 4 | 54 | 16 |
19-
| **Nano** | ATmega328P | 16 MHz | 32 KB | 2 KB | 1 | 22 | 8 |
20-
| **Due** | AT91SAM3X8E | 84 MHz | 512 KB | 96 KB | 4 | 54 | 12 |
21-
| **Leonardo** | ATmega32U4 | 16 MHz | 32 KB | 2.5 KB | 1 (+USB) | 20 | 12 |
15+
| Board | CPU | Architecture | Clock | Flash | RAM | UARTs | Digital Pins | Analog Pins | Voltage | Config Module |
16+
|---|---|---|---|---|---|---|---|---|---|---|
17+
| **Uno R3** | ATmega328P | AVR 8-bit | 16 MHz | 32 KB | 2 KB | 1 | 14 | 6 | 5.0 V | `config_uno.py` |
18+
| **Mega 2560** | ATmega2560 | AVR 8-bit | 16 MHz | 256 KB | 8 KB | 4 | 54 | 16 | 5.0 V | `config_mega.py` |
19+
| **Nano** | ATmega328P | AVR 8-bit | 16 MHz | 32 KB | 2 KB | 1 | 22 | 8 | 5.0 V | `config_nano.py` |
20+
| **Due** | AT91SAM3X8E | ARM Cortex-M3 | 84 MHz | 512 KB | 96 KB | 4 | 54 | 12 | 3.3 V | `config_due.py` |
21+
| **MKR WiFi 1010** | SAMD21G18A | ARM Cortex-M0+ | 48 MHz | 256 KB | 32 KB | 1 | 22 | 7 | 3.3 V | `config_mkr_wifi.py` |
22+
| **Nano 33 IoT** | SAMD21G18A | ARM Cortex-M0+ | 48 MHz | 256 KB | 32 KB | 1 | 20 | 8 | 3.3 V | `config_nano33_iot.py` |
23+
24+
### Board Selection Guide
25+
26+
- **Uno R3** — Best for simple single-sensor experiments and prototyping
27+
- **Mega 2560** — Ideal for multi-sensor arrays requiring 4 UARTs and 54 GPIO
28+
- **Nano** — Compact breadboard-friendly form factor with extended analog inputs (A0–A7)
29+
- **Due** — High-performance ARM Cortex-M3 for edge computing, sensor fusion, PID control
30+
- **MKR WiFi 1010** — WiFi/BLE connectivity for wireless sensor gateway applications
31+
- **Nano 33 IoT** — Ultra-compact WiFi/BLE mesh node for distributed sensor fleets
2232

2333
---
2434

@@ -42,8 +52,8 @@ print(f"GPS : TX=D{cfg.pin_mapping.GPS_TX} RX=D{cfg.pin_mapping.GPS_RX}")
4252
```
4353

4454
- **Preamble**: `0xAA 0x55` (configurable)
45-
- **Max frame size**: 256 bytes
46-
- **Heartbeat interval**: 500 ms (configurable per board)
55+
- **Max frame size**: 256 bytes (Uno/Nano), 512 bytes (Due/MKR)
56+
- **Heartbeat interval**: 250–500 ms (configurable per board)
4757

4858
---
4959

@@ -92,6 +102,64 @@ print(f"GPS : TX=D{cfg.pin_mapping.GPS_TX} RX=D{cfg.pin_mapping.GPS_RX}")
92102
| ESP / Companion | D16 (TX2) / D17 (RX2) | Serial2 | NEXUS backbone link |
93103
| Aux Serial | D14 (TX3) / D15 (RX3) | Serial3 | Payload comms |
94104

105+
### Arduino Due — High-Performance Edge Layout
106+
107+
| Function | Pin | Interface | Notes |
108+
|---|---|---|---|
109+
| GPS | D19/D18 | Serial1 | Dedicated UART |
110+
| IMU #1 | D20/D21 | I2C (Wire) | Primary IMU |
111+
| IMU #2 | SDA1/SCL1 | I2C (Wire1) | Extended I2C header |
112+
| Sonar Array | D22–D29 | GPIO | Up to 4 sonar modules |
113+
| Temperature ×4 | A0–A3 | Analog / 1-Wire | Multi-zone monitoring |
114+
| Pressure | A4 | Analog / I2C | Depth sensor |
115+
| Water Quality | A5 | Analog | Turbidity / dissolved O2 |
116+
| DAC0 / DAC1 | DAC0/DAC1 | Analog Out | Direct analog control |
117+
| Thrusters ×4 | D34–D37 | PWM | 4-axis thruster control |
118+
| Companion | D16/D17 | Serial2 | NEXUS backbone |
119+
| Aux Serial | D14/D15 | Serial3 | Payload comms |
120+
| Relays | D30–D31 | GPIO | Power management |
121+
122+
### Arduino Nano — Compact Sensor Node Layout
123+
124+
| Function | Pin | Interface | Notes |
125+
|---|---|---|---|
126+
| GPS | D0/D1 | UART | Shared with USB (SoftwareSerial) |
127+
| IMU | A4/A5 | I2C | Default I2C pins |
128+
| Sonar | D7/D8 | GPIO | HC-SR04 |
129+
| Temperature | A0 | Analog | NTC / DS18B20 |
130+
| Pressure | A1 | Analog / I2C | Depth sensor |
131+
| Extra ADC | A2–A3 | Analog | Extended analog inputs |
132+
| Servo | D9 | PWM | Rudder control |
133+
| Thruster | D10 | PWM | ESC / thruster driver |
134+
| LED | D13 | GPIO | Onboard LED |
135+
136+
### Arduino MKR WiFi 1010 — Wireless Sensor Gateway
137+
138+
| Function | Pin | Interface | Notes |
139+
|---|---|---|---|
140+
| GPS | D13/D14 | Serial1 | Dedicated UART |
141+
| IMU | D11/D12 | I2C | Standard I2C |
142+
| Sonar | D6/D7 | GPIO | HC-SR04 |
143+
| Temperature | A0 | Analog / 1-Wire | NTC / DS18B20 |
144+
| Pressure | A1 | I2C | MS5837 |
145+
| Servos | D4/D5 | PWM | Dual servo control |
146+
| SPI | D5/D8-D10 | SPI | External peripherals |
147+
| WiFi | NINA-W102 | WiFi/BLE | u-blox module |
148+
149+
### Arduino Nano 33 IoT — Wireless Mesh Sensor Node
150+
151+
| Function | Pin | Interface | Notes |
152+
|---|---|---|---|
153+
| GPS | D0/D1 | Serial1 | Hardware UART |
154+
| IMU | A4/A5 | I2C | External + built-in LSM6DS3 |
155+
| Sonar | D7/D8 | GPIO | HC-SR04 |
156+
| Temperature | A0 | Analog / 1-Wire | NTC / DS18B20 |
157+
| Pressure | A1 | I2C | MS5837 |
158+
| Servo | D9 | PWM | Single servo |
159+
| Thruster | D3 | PWM | ESC control |
160+
| LED | D13 + RGB | GPIO | Status + RGB indicator |
161+
| WiFi/BLE | NINA-W102 | WiFi/BLE | Mesh networking |
162+
95163
---
96164

97165
## Getting Started
@@ -105,22 +173,37 @@ pip install nexus-runtime
105173
### 2. Import and configure your board
106174

107175
```python
108-
from nexus.hardware.arduino import get_board_config, list_supported_boards
176+
from hardware.arduino import get_board_config, list_supported_boards
109177

110178
# List all supported boards
111179
boards = list_supported_boards()
112-
print(boards) # ['uno', 'mega', 'nano', 'due', 'leonardo']
180+
print(boards) # ['due', 'leonardo', 'mkr_wifi', 'mega', 'nano', 'nano33_iot', 'uno']
113181

114182
# Get Uno configuration
115183
uno = get_board_config("uno")
116184
print(uno.serial_config) # SerialConfig(baud_rate=115200, ...)
117185
print(uno.pin_mapping.GPS_TX) # 0
186+
187+
# Get Due configuration (high-performance edge node)
188+
due = get_board_config("due")
189+
print(due.board_config.clock_hz) # 84_000_000
190+
print(due.nexus_edge.edge_processing_enabled) # True
191+
192+
# Get MKR WiFi 1010 configuration (wireless gateway)
193+
mkr = get_board_config("mkr_wifi")
194+
print(mkr.wifi_config.wifi_enabled) # True
195+
print(mkr.nexus_bridge.bridge_protocol) # MQTT
196+
197+
# Get Nano 33 IoT configuration (mesh sensor node)
198+
nano_iot = get_board_config("nano33_iot")
199+
print(nano_iot.wifi_config.low_power_mode) # True
200+
print(nano_iot.nexus_mesh.mesh_enabled) # True
118201
```
119202

120203
### 3. Configure sensor drivers
121204

122205
```python
123-
from nexus.hardware.arduino.sensor_drivers import (
206+
from hardware.arduino.sensor_drivers import (
124207
GPSSensorConfig, IMUSensorConfig, SonarConfig
125208
)
126209

@@ -159,21 +242,34 @@ print("NEXUS link established.")
159242
┌───────────────────────────────────────────────┐
160243
│ NEXUS Central Hub │
161244
│ (Raspberry Pi / Jetson / PC) │
162-
└──────────────┬───────────────────┬────────────┘
163-
│ 115200 UART │ 115200 UART
164-
┌──────┴──────┐ ┌───────┴───────┐
165-
│ Arduino Mega │ │ Arduino Uno │
166-
│ (Sensors) │ │ (Actuators) │
167-
│ GPS, IMU, │ │ Servos, │
168-
│ Sonars, Temp │ │ Thrusters │
169-
└──────────────┘ └───────────────┘
245+
└──────────┬───────────────────┬───────────────┘
246+
│ 115200 UART │ WiFi/MQTT
247+
┌───────┴──────┐ ┌────────┴─────────┐
248+
│ Arduino Mega │ │ MKR WiFi 1010 │
249+
│ (Sensors) │ │ (WiFi Gateway) │
250+
│ GPS, IMU, │ │ WiFi/BLE Mesh │
251+
│ Sonars, Temp │ │ OTA Updates │
252+
└──────────────┘ └─────────────────┘
253+
│ 115200 UART │ WiFi/BLE Mesh
254+
┌───────┴──────┐ ┌────────┴─────────┐
255+
│ Arduino Due │ │ Nano 33 IoT │
256+
│ (Edge CPU) │ │ (Sensor Node) │
257+
│ Sensor Fusion│ │ GPS, Temp, │
258+
│ PID Control │ │ Sonar, IMU │
259+
└──────────────┘ └─────────────────┘
260+
│ 115200 UART
261+
┌───────┴──────┐
262+
│ Arduino Nano │
263+
│ (Compact I/O│
264+
│ + Extra ADC)│
265+
└──────────────┘
170266
```
171267

172268
---
173269

174270
## Keywords
175271

176-
arduino, marine robotics, NEXUS, AUV, ROV, autonomous vessel, sensor integration, serial protocol, underwater robotics, USV, microcontroller, edge computing, telemetry, ocean engineering.
272+
arduino, marine robotics, NEXUS, AUV, ROV, autonomous vessel, sensor integration, serial protocol, underwater robotics, USV, microcontroller, edge computing, telemetry, ocean engineering, ESP8266, ESP32, WiFi mesh, BLE.
177273

178274
---
179275

hardware/arduino/__init__.py

Lines changed: 85 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,47 @@
2929
MegaConfig,
3030
get_mega_config,
3131
)
32+
from hardware.arduino.config_nano import (
33+
BoardConfig as NanoBoardConfig,
34+
SerialConfig as NanoSerialConfig,
35+
WireProtocolConfig as NanoWireProtocolConfig,
36+
PinMapping as NanoPinMapping,
37+
InterfacePins as NanoInterfacePins,
38+
NanoConfig,
39+
get_nano_config,
40+
)
41+
from hardware.arduino.config_due import (
42+
BoardConfig as DueBoardConfig,
43+
SerialConfig as DueSerialConfig,
44+
WireProtocolConfig as DueWireProtocolConfig,
45+
NexusEdgeConfig as DueNexusEdgeConfig,
46+
PinMapping as DuePinMapping,
47+
InterfacePins as DueInterfacePins,
48+
DueConfig,
49+
get_due_config,
50+
)
51+
from hardware.arduino.config_mkr_wifi import (
52+
BoardConfig as MKRBoardConfig,
53+
SerialConfig as MKRSerialConfig,
54+
WireProtocolConfig as MKRWireProtocolConfig,
55+
WiFiConfig as MKRWiFiNetworkConfig,
56+
NexusBridgeConfig as MKRNexusBridgeConfig,
57+
PinMapping as MKRPinMapping,
58+
InterfacePins as MKRInterfacePins,
59+
MKRWiFiConfig,
60+
get_mkr_wifi_config,
61+
)
62+
from hardware.arduino.config_nano33_iot import (
63+
BoardConfig as Nano33IoTBoardConfig,
64+
SerialConfig as Nano33IoTSerialConfig,
65+
WireProtocolConfig as Nano33IoTWireProtocolConfig,
66+
WiFiConfig as Nano33IoTWiFiConfig,
67+
NexusMeshConfig as Nano33IoTNexusMeshConfig,
68+
PinMapping as Nano33IoTPinMapping,
69+
InterfacePins as Nano33IoTInterfacePins,
70+
Nano33IoTConfig,
71+
get_nano33_iot_config,
72+
)
3273
from hardware.arduino.sensor_drivers import (
3374
GPSSensorConfig,
3475
IMUSensorConfig,
@@ -55,6 +96,43 @@
5596
"MegaPinMapping",
5697
"MegaConfig",
5798
"get_mega_config",
99+
# Nano
100+
"NanoBoardConfig",
101+
"NanoSerialConfig",
102+
"NanoWireProtocolConfig",
103+
"NanoPinMapping",
104+
"NanoInterfacePins",
105+
"NanoConfig",
106+
"get_nano_config",
107+
# Due
108+
"DueBoardConfig",
109+
"DueSerialConfig",
110+
"DueWireProtocolConfig",
111+
"DueNexusEdgeConfig",
112+
"DuePinMapping",
113+
"DueInterfacePins",
114+
"DueConfig",
115+
"get_due_config",
116+
# MKR WiFi 1010
117+
"MKRBoardConfig",
118+
"MKRSerialConfig",
119+
"MKRWireProtocolConfig",
120+
"MKRWiFiNetworkConfig",
121+
"MKRNexusBridgeConfig",
122+
"MKRPinMapping",
123+
"MKRInterfacePins",
124+
"MKRWiFiConfig",
125+
"get_mkr_wifi_config",
126+
# Nano 33 IoT
127+
"Nano33IoTBoardConfig",
128+
"Nano33IoTSerialConfig",
129+
"Nano33IoTWireProtocolConfig",
130+
"Nano33IoTWiFiConfig",
131+
"Nano33IoTNexusMeshConfig",
132+
"Nano33IoTPinMapping",
133+
"Nano33IoTInterfacePins",
134+
"Nano33IoTConfig",
135+
"get_nano33_iot_config",
58136
# Sensors
59137
"GPSSensorConfig",
60138
"IMUSensorConfig",
@@ -76,8 +154,10 @@
76154
_BOARD_REGISTRY = {
77155
"uno": ("Arduino Uno R3", get_uno_config),
78156
"mega": ("Arduino Mega 2560", get_mega_config),
79-
"nano": ("Arduino Nano", None), # placeholder — same as Uno
80-
"due": ("Arduino Due", None), # placeholder
157+
"nano": ("Arduino Nano", get_nano_config),
158+
"due": ("Arduino Due", get_due_config),
159+
"mkr_wifi": ("Arduino MKR WiFi 1010", get_mkr_wifi_config),
160+
"nano33_iot": ("Arduino Nano 33 IoT", get_nano33_iot_config),
81161
"leonardo": ("Arduino Leonardo", None), # placeholder
82162
}
83163

@@ -93,13 +173,14 @@ def get_board_config(board_name: str, **overrides):
93173
Parameters
94174
----------
95175
board_name : str
96-
One of ``"uno"``, ``"mega"``, ``"nano"``, ``"due"``, ``"leonardo"``.
176+
One of ``"uno"``, ``"mega"``, ``"nano"``, ``"due"``,
177+
``"mkr_wifi"``, ``"nano33_iot"``, or ``"leonardo"``.
97178
**overrides
98179
Keyword overrides forwarded to the board's config constructor.
99180
100181
Returns
101182
-------
102-
UnoConfig | MegaConfig
183+
UnoConfig | MegaConfig | NanoConfig | DueConfig | MKRWiFiConfig | Nano33IoTConfig
103184
104185
Raises
105186
------

0 commit comments

Comments
 (0)