Binary protocol over RFM12B radio with JeeLibs library.
To Locomotive
Byte | Meaning | Format | Unit | Description |
---|---|---|---|---|
0 | Control | Bit map | TBD | TBD |
1 | Target speed and direction | Signed char | TBD | -127 .. +127, 0 = stop |
2 | Acceleration | Signed char | TBD | -127 .. +127, Speed steps per second |
3 | Lights | Bit map | TBD | TBD |
From Locomotive
Byte | Meaning | Format | Unit | Description |
---|---|---|---|---|
0 | Status | Bit map | TBD | TBD |
1 | Target speed and direction | Signed char | TBD | -127 .. +127, 0 = stop |
2 | Current power control [PWM] | Signed char | [%] | -100 .. +100, 0 = stop |
3 | Current speed (optional) | Signed char | TBD | TBD |
4 | Distance since reset, Low byte (optional) | Long | TBD | TBD |
5 | Distance since reset, High byte (optional) | Long | TBD | TBD |
6 | Supply Voltage (optional) | Unsigned char | 0.1V | 0 .. 25.5V |
7 | Motor Current (optional) | Unsigned char | 0.01A | 0 .. 2.55A |
To query data from Locomotive, empty message may be transmitted.