mirror of
https://github.com/EFeru/hoverboard-firmware-hack-FOC.git
synced 2025-08-04 10:04:28 +02:00
Updated Variant USART (markdown)
@@ -1,5 +1,13 @@
|
||||
This variant can be used to control the board from another board(e.g. Arduino, ESP32, ESP8266,RASPBERRY PI) or a computer via a serial protocol.<br />
|
||||
The example [Arduino sketch](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/tree/master/Arduino/hoverserial) will send commands and process the feedback.
|
||||
The example [Arduino sketch](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/master/Arduino/hoverserial/hoverserial.ino) will send commands and process the feedback.<br />
|
||||
Those commands are send as binary frames with following structure:<br />
|
||||
- Start frame : 0XABCD as unsigned int16
|
||||
- Steer : -1000 to 1000 as signed int16
|
||||
- Speed : -1000 to 1000 as signed int16
|
||||
- Checksum : XOR checksum as unsigned int16
|
||||
|
||||
The FOC firmware will discard frames that are not starting with proper start frame and not ending with correct checksum.<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 />
|
||||
|
||||
## Wiring:
|
||||
* Connect blue wire to RX, green wire to TX and black wire to GND of Arduino on right sensor cable(shorter)
|
||||
@@ -7,8 +15,7 @@ The example [Arduino sketch](https://github.com/EmanuelFeru/hoverboard-firmware-
|
||||
⚠ Red wire from sensor cable delivers 15v !!!
|
||||
|
||||
## Calibration:
|
||||
Proceed with [calibration](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/wiki/Calibration) for better control if you use input devices(e.g. Joystick or Throttle handle) on the Arduino.
|
||||
|
||||
[Calibration](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/wiki/Calibration) is not required with USART control, but can be done if you use an input devices(e.g. Joystick or Throttle handle) on the Arduino and are not taking care of calibration center value and min/max range there.
|
||||
## Troubleshooting:
|
||||
|
||||
If the board is beeping
|
||||
|
Reference in New Issue
Block a user