You are here

How to reverse direction from VESC UART?

2 posts / 0 new
Last post
vinchi
Offline
Last seen: 4 months 1 week ago
VESC Free
Joined: 2019-12-11 20:12
Posts: 2
How to reverse direction from VESC UART?

Hi!

Can someone please explain how to spin motor reverse direction with VESCUART (SolidGeek) and NunchuckValues?
I can spin it forward but I don't understand how to spin it backwards.

Here is my Arduino example:

#include "VescUart.h"
VescUart VESCUART;

void setup() {

  Serial1.begin(115200);
  VESCUART.setSerialPort(&Serial1);

}

void loop() {

  VESCUART.nunchuck.valueY = 170;
  VESCUART.setNunchuckValues();
  delay(10000);

}

 

At the beginning I thought that 127 value is zero current and values below that are reverse. But it is not working like that.

I have catched raw hex value for reverse from VESC tool "02 05 05 FF FF D8 F0 D4 06 03" but it is to complex for me :)

vinchi
Offline
Last seen: 4 months 1 week ago
VESC Free
Joined: 2019-12-11 20:12
Posts: 2

Looks like I found the solution how it works.

Just need to send negative UART.setDuty() value.

May be someone who is also new to this will find this useful.