VESC library for CAN bus control using MCP2515 SPI Driver
This repo contains the CAN bus protocol for VESC that can be used with arduino and the MCP2515 driver library by Cory Fowler (see credits). The MCP2515 is the most common way to integrate can bus onto the arduino platform. The VESC platform is the gold standard for brushless motor control for skateboards and ebikes. This library allows you to use the can bus instead of UART (see solidgeek vescuart library) to communicate with the VESC which is more reliable and allows the single UART port on most arduinos to be free for debugging.
Parameter |
---|
rpm |
inpVoltage |
dutyCycleNow |
avgInputCurrent |
avgMotorCurrent |
tempFET |
tempMotor |
WattHours |
Parameter |
---|
erpm |
dutycycle |
current |
To use the library out of the box, the vesc tool must be configured as shown in images/vesc_tool_app_settings.png. VESC ID = 10 CAN STATUS_MESSAGE_MODE = CAN_STATUS_1_2_3_4_5 CAN Baud Rate = CAN_BAUD_250K
Place the .h and .cpp file in the same folder as the .ino file to use this library with no changes.
- Craig Gault - https://github.com/craigg96
DEPENDENCIES
LICENSE