16 lines
882 B
Markdown
16 lines
882 B
Markdown
# XIAO ESP32-C6 Sensor Node
|
|
|
|
This Arduino sketch reads a BNO086 IMU and MAX-M10S GPS and publishes versioned, newline-delimited JSON over the Seeed RS485 expansion board. It produces vehicle telemetry only; Cargo remains the controller and `/api/v1` authority.
|
|
|
|
| Function | XIAO pin |
|
|
| --- | --- |
|
|
| RS485 DE / TX / RX | D2 / D4 / D5 |
|
|
| BNO086 SDA / SCL | D7 / D8 |
|
|
| GPS TX to XIAO RX | D9 |
|
|
| GPS RX from XIAO TX | D10 |
|
|
|
|
Power both sensors from 3.3V with shared ground. Required Arduino libraries are Adafruit BNO08x, TinyGPSPlus, and ArduinoJson 6.x. Enable **USB CDC On Boot** for diagnostics. GPS uses hardware UART0 and RS485 uses hardware UART1.
|
|
|
|
The node sends `sensor_status` at 115200 baud every 200 ms. See `docs/SENSOR_NODE_PROTOCOL.md`. The initial firmware is transmit-only; add a dashboard receiver after bench-testing the node, RS485 polarity, and sensor axes.
|
|
|