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 :)
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.
Hey dude!
Can you show me how you do this?
Can you show it by writing it in lines of code?
Hello okanmert89 , if you want to change the duty use this library GitHub - SolidGeek/VescUart: An Arduino library for interfacing with the VESC over UART and you can use like
float current = 1.0;
UART.setCurrent(current); or UART.setDuty(100.0);
vinchi if you want to understand the data pls look this link Control with CAN - OpenRobot, Inc (gitbook.io) remember there are two ids. One of them is uart id which is you can see the vesc software and can id . Your id in gui is decimal , you can see hexa in com port.
E.E.