VescUart icon indicating copy to clipboard operation
VescUart copied to clipboard

set current and velocity?

Open comes04 opened this issue 1 year ago • 1 comments

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

comes04 avatar Apr 11 '23 14:04 comes04

It's impossible right now. This is not implemented in the vesc firmware. Somehow it's quite easy.

Iv avatar Jul 08 '23 13:07 Iv