mirror of
https://github.com/EFeru/hoverboard-firmware-hack-FOC.git
synced 2025-08-04 10:04:28 +02:00
Updated Variant USART (markdown)
@@ -8,8 +8,11 @@ You can also test this variant with following [Web Tool](https://candas1.github.
|
|||||||
|
|
||||||
⚠ Red wire from sensor cable delivers 15v !!!
|
⚠ Red wire from sensor cable delivers 15v !!!
|
||||||
|
|
||||||
|
## Usart configuration:
|
||||||
|
The default baud rate is 115200.
|
||||||
|
|
||||||
## Input:
|
## Input:
|
||||||
Those commands are send as binary frames with following structure:<br />
|
Commands are send as binary frames with following structure:<br />
|
||||||
- Start frame(unsigned int16) : 0xABCD
|
- Start frame(unsigned int16) : 0xABCD
|
||||||
- Steer(signed int16) : Steer or Brake(hovercar) with range -1000 to 1000
|
- Steer(signed int16) : Steer or Brake(hovercar) with range -1000 to 1000
|
||||||
- Speed(signed int16) : Speed or Throttle(hovercar) with range -1000 to 1000
|
- Speed(signed int16) : Speed or Throttle(hovercar) with range -1000 to 1000
|
||||||
@@ -19,7 +22,7 @@ The FOC firmware will discard frames that are not starting with proper start fra
|
|||||||
A timeout will be triggered if no correct frame is received during the time specified with parameter SERIAL_TIMEOUT in config.h (160ms by default).<br />
|
A timeout will be triggered if no correct frame is received during the time specified with parameter SERIAL_TIMEOUT in config.h (160ms by default).<br />
|
||||||
|
|
||||||
## Feedback:
|
## Feedback:
|
||||||
Following feedback is sent back:
|
Following feedback is sent:
|
||||||
- Start frame(unsigned int16) : 0xABCD
|
- Start frame(unsigned int16) : 0xABCD
|
||||||
- Cmd1(signed int16) : Steer or Brake(hovercar) after normalizing and mixing
|
- Cmd1(signed int16) : Steer or Brake(hovercar) after normalizing and mixing
|
||||||
- Cmd2(signed int16): Speed or Throttle(hovercar) after normalizing and mixing
|
- Cmd2(signed int16): Speed or Throttle(hovercar) after normalizing and mixing
|
||||||
@@ -27,7 +30,7 @@ Following feedback is sent back:
|
|||||||
- SpeedL(signed int16) : Measured left wheel speed
|
- SpeedL(signed int16) : Measured left wheel speed
|
||||||
- Battery Voltage(signed int16) : Calibrated Battery Voltage *100
|
- Battery Voltage(signed int16) : Calibrated Battery Voltage *100
|
||||||
- Temperature(signed int16) : Temperature in °C *10
|
- Temperature(signed int16) : Temperature in °C *10
|
||||||
- Led(unsigned int16) : used to control the leds on the sideboard
|
- Led(unsigned int16) : Used to control the leds on the sideboard
|
||||||
- Checksum(unsigned int16) : XOR checksum
|
- Checksum(unsigned int16) : XOR checksum
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user