fix: restore verified XIAO RS485 pin direction
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
The XIAO sensor node reads the BNO086 and MAX-M10S and publishes vehicle telemetry over half-duplex RS485 at 115200 8-N-1, one JSON object per line at 4 Hz. It owns no control state. Cargo remains the controller, HTTP server, and `/api/v1` source of truth; JBD/NimBLE behavior is unchanged.
|
The XIAO sensor node reads the BNO086 and MAX-M10S and publishes vehicle telemetry over half-duplex RS485 at 115200 8-N-1, one JSON object per line at 4 Hz. It owns no control state. Cargo remains the controller, HTTP server, and `/api/v1` source of truth; JBD/NimBLE behavior is unchanged.
|
||||||
|
|
||||||
The expansion-board pins are D2 driver enable, D4 RX, and D5 TX, matching Seeed's XIAO RS485 expansion-board wiring. Only physical bus ends should be terminated. Confirm A/B polarity because vendor labels vary.
|
The expansion-board pins are D2 driver enable, D4 TX, and D5 RX. This matches Seeed's working example call `begin(115200, SERIAL_8N1, 7, 6)`: on XIAO, GPIO7 is D5/RX and GPIO6 is D4/TX. Only physical bus ends should be terminated. Confirm A/B polarity because vendor labels vary.
|
||||||
|
|
||||||
## Schema version 1
|
## Schema version 1
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ This Arduino sketch reads a BNO086 IMU and MAX-M10S GPS and publishes versioned,
|
|||||||
|
|
||||||
| Function | XIAO pin |
|
| Function | XIAO pin |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| RS485 DE / RX / TX | D2 / D4 / D5 |
|
| RS485 DE / TX / RX | D2 / D4 / D5 |
|
||||||
| BNO086 SDA / SCL | D7 / D8 |
|
| BNO086 SDA / SCL | D7 / D8 |
|
||||||
| GPS TX to XIAO RX | D9 |
|
| GPS TX to XIAO RX | D9 |
|
||||||
| GPS RX from XIAO TX | D10 |
|
| GPS RX from XIAO TX | D10 |
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#define SENSOR_NODE_NAME "xiao_c6_sensor_node"
|
#define SENSOR_NODE_NAME "xiao_c6_sensor_node"
|
||||||
#define SENSOR_NODE_FIRMWARE_VERSION "0.2.1"
|
#define SENSOR_NODE_FIRMWARE_VERSION "0.2.2"
|
||||||
#define SENSOR_NODE_SCHEMA_VERSION 1
|
#define SENSOR_NODE_SCHEMA_VERSION 1
|
||||||
#define RS485_DE_PIN D2
|
#define RS485_DE_PIN D2
|
||||||
#define RS485_RX_PIN D4
|
#define RS485_TX_PIN D4
|
||||||
#define RS485_TX_PIN D5
|
#define RS485_RX_PIN D5
|
||||||
#define BNO086_SDA_PIN D7
|
#define BNO086_SDA_PIN D7
|
||||||
#define BNO086_SCL_PIN D8
|
#define BNO086_SCL_PIN D8
|
||||||
#define GPS_RX_PIN D9
|
#define GPS_RX_PIN D9
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ def source(name): return (NODE / name).read_text()
|
|||||||
|
|
||||||
def test_wiring_matches_assembly():
|
def test_wiring_matches_assembly():
|
||||||
config = source("sensor_node_config.h")
|
config = source("sensor_node_config.h")
|
||||||
expected = {"RS485_DE_PIN":"D2", "RS485_RX_PIN":"D4", "RS485_TX_PIN":"D5",
|
expected = {"RS485_DE_PIN":"D2", "RS485_TX_PIN":"D4", "RS485_RX_PIN":"D5",
|
||||||
"BNO086_SDA_PIN":"D7", "BNO086_SCL_PIN":"D8", "GPS_RX_PIN":"D9", "GPS_TX_PIN":"D10"}
|
"BNO086_SDA_PIN":"D7", "BNO086_SCL_PIN":"D8", "GPS_RX_PIN":"D9", "GPS_TX_PIN":"D10"}
|
||||||
for name, pin in expected.items(): assert re.search(rf"#define\s+{name}\s+{pin}\b", config)
|
for name, pin in expected.items(): assert re.search(rf"#define\s+{name}\s+{pin}\b", config)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user