can anyone tell me, my project is going to get vesc values using uart comunication from vesc to esp32, my program did very well and get the data like a voltage,rpm,current etc. But it only work at my friends laptop (older laptop than mine). in my laptop with the same program to get vesc values it wont work (no data get/failed to get data). can anyone help me please
#include <VescUart.h>
#include <SoftwareSerial.h>
/** Initiate VescUart class */
VescUart vesc;
/** Initiate SoftwareSerial class */
SoftwareSerial vescSerial(13, 15);
void setup() {
/** Setup Serial port to display data */
Serial.begin(9600);
/** Setup SoftwareSerial port */
vescSerial.begin(19200);
/** Define which ports to use as UART */
vesc.setSerialPort(&vescSerial);
}
void loop() {
/** Call the function getVescValues() to acquire data from VESC */
if ( vesc.getVescValues() ) {
Serial.println(vesc.data.rpm);
Serial.println(vesc.data.inpVoltage);
Serial.println(vesc.data.ampHours);
Serial.println(vesc.data.tachometerAbs);
}
else
{
Serial.println("Failed to get data!");
}
delay(50);
}