Updated Variant USART (markdown)

Candas1
2022-01-02 10:55:53 +01:00
parent ee7997a9c3
commit 36553455d2

@@ -4,6 +4,11 @@ The example [Arduino sketch](https://github.com/EmanuelFeru/hoverboard-firmware-
You can also test this variant with following [Web Tool](https://github.com/Candas1/Hoverboard-Web-Serial-Control), it let's you control the board and trace feedback values.<br>
This [Python code](https://github.com/kosni68/HoverSerial) inspired by the code shared in this [issue](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/issues/157) can also be used to control the firmware.
## Configuration
Use CONTROL_SERIAL_USART3 and FEEDBACK_SERIAL_USART3 for the right sensor cable(default), or CONTROL_SERIAL_USART2 and FEEDBACK_SERIAL_USART2 for left sensor cable.<br>
SIDEBOARD_SERIAL_USART2 or SIDEBOARD_SERIAL_USART3 parameters enable a different [protocol](https://github.com/EFeru/hoverboard-firmware-hack-FOC/issues/143) implemented on the [sideboard firmware](https://github.com/EFeru/hoverboard-sideboard-hack-GD). It can also be used with the [Web tool](https://github.com/Candas1/Hoverboard-Web-Serial-Control#protocol---hovercar) for testing the different control modes/types.<br>
You can adjust USART2_BAUD and USART3_BAUD parameters if you need different baud speed.
## Wiring:
* Connect blue wire to RX, green wire to TX and black wire to GND of Arduino on right sensor cable(shorter)
@@ -53,7 +58,7 @@ The least significant byte comes first (little endian).
If the board is [beeping](https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/wiki/Diagnostics)
* Make sure the baud rate is 115200
* Make sure you are using the sensor cable(left=USART2 or right=USART3) selected in config.h
* Make sure you are using the sensor cable(left=CONTROL_SERIAL_USART2 or right=CONTROL_SERIAL_USART3) selected in config.h
* Assuming RX or/and TX can be defective on your mainboard, you can switch to other sensor cable in config.h
* On some boards the wire colors might differ, try switching blue and green wires
* Your Arduino TX/RX might not be working, you can verify that by trying with and FTDI and the Web tool to confirm the mainboard/firmware is not the issue