You are here

UART CAN forwarding

3 posts / 0 new
Last post
frankus
Offline
Last seen: 1 year 3 weeks ago
Joined: 2018-10-31 03:33
Posts: 1
UART CAN forwarding

I have a two-VESC longboard that I want to control via UART. 

Setup:

  • 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.

What works:

  • 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. 

 

magnushedin
Offline
Last seen: 3 months 1 day ago
VESC Free
Joined: 2019-09-01 19:32
Posts: 1

I have  exactly the same problem.

When I use PPM as input both motors spin, but with UART only the first motor spins.

Did you find any solution to this problem?

Elmerchwartz
Offline
Last seen: 1 week 4 hours ago
Joined: 2020-02-14 07:48
Posts: 1

UART can forwarding setup with some solutions. To get solutions which forward all personal statement writing service details with you. Everything which just come through these solutions are important and also valid which we give to you.