Skip to content

StefanMeGit/VescUartUnity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VescUartUnity

Arduino library for FocBox Unity from ENERTION

Important: This is not a dropin replacement for RollingGeckos library. You will have to make some changes to your software, as all functions and values is now within a class, see below.

Implementation

To use the library you will have initiate the VescUartUnity class and set the Serial port for UART communcation.

#include <VescUartUnity.h>

VescUartUnity UART;

void setup() {
  Serial.begin(115200);

  while (!Serial) {;}

  UART.setSerialPort(&Serial);
}

You can now safely use the functions and change the values of the class.

Getting VESC telemetry is easy:

if ( UART.getVescValues() ) {
  Serial.println(UART.data.filteredFetTemp0);
  Serial.println(UART.data.inpVoltage);
  Serial.println(UART.data.filteredMotorTemp1);
  Serial.println(UART.data.ampHours);
  ...
}

About

UART library for FocBox Unity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published