I have a two-VESC longboard that I want to control via UART.
- Master VESC has ID of 0
- Slave VESC has ID of 1
- In VESCTool, forwarding over CAN lets me configure/control the slave VESC
- Slave VESC is set to No App
- Slave VESC Send CAN Status is set to True (false for master)
- https://github.com/bastianraschke/ESP8266VESC library for controlling VESC from an Arduino UNO clone
- I modified the above GitHub link to insert the COMM_FORWARD_CAN and slave VESC ID (1) bytes and increase the payload size by two to make room.
- I can spin up the master motor by sending a current command over UART
- I can spin up either motor in VESC tool by checking/unchecking the CAN forwarding feature
What doesn't work:
- When I try to spin up the slave motor via UART it doesn't move.
Here's what I'm sending to the master VESC over UART:
2 5 6 0 0 11 184 55 172 3 (set current to 3A) 2 7 33 1 6 0 0 11 184 164 155 3 (forward to VESC 1 and set current to 3A -- UPDATED)
If I just send the first line repeatedly, the master motor spins up nicely. If I send just the second line, or both, nothing happens.
EDIT 2: I had an error in my packet assembly code. It looks like I have the right CRC and everything now, but it's still not working.