VescUart
VescUart copied to clipboard
set current and velocity?
Hi there,
I used the example code SetCurrent as following with an Arduino UNO and its working as intended.
#include <VescUart.h>
/** Initiate VescUart class */
VescUart UART;
float current = 2.0; /** The current in amps */
void setup() {
Serial.begin(9600);
/** Setup UART port (Serial1 on Atmega32u4) */
Serial.begin(115200);
/** Define which ports to use as UART */
UART.setSerialPort(115200);
}
void loop() {
/** Call the function setCurrent() to set the motor current */
UART.setCurrent(current);
}
My question is, if its possible to set both current and speed so I have control over the torque of my BLDC motor. Thanks in advance
It's impossible right now. This is not implemented in the vesc firmware. Somehow it's quite easy.