IO: Sensor Unit #
A module collecting data from sensors. Periodically sends the data to the network.
The unit consists of:
- 1x - Nucleo F411RE
- 3x - HC-SR04 module
- 1x - KY-018 photoresistor module
- 1x - MCP2515 CAN bus module
Schematic #
Communication #
CAN bus
- Protocol: qCAN 0.2.0, standard CAN frame
- Address: 0x4
Serial
- Speed: 115200 BPS
Data Message #
The unit sends a data message with sensor data every 100 ms.
- Message Type: 0x1 (Data Message)
Message content:
Field | Value |
---|---|
MSG ID | 0x401 |
DATA0 | HC-SR04 Left: distance - 0..200 cm |
DATA1 | HC-SR04 Center: distance - 0..200 cm |
DATA2 | HC-SR04 Right: distance - 0..200 cm |
DATA3 | KY-018: Light value - High 4 bits |
DATA4 | KY-018: Light value - Low 8 bits |