Arduino library to interface with the VESC bldc over UART.
Branch: master
Clone or download
Pull request Compare This branch is 4 commits ahead, 42 commits behind RollingGecko:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples/VescUartSample
LICENSE.md
Readme.md
VescUart.cpp
VescUart.h
buffer.cpp
buffer.h
crc.cpp
crc.h
datatypes.h

Readme.md

#VescUartControl library

Library for arduino to interface over UART with the Vesc BLDC controler (http://vedder.se/2015/01/vesc-open-source-esc/)

The files libraries

crc

datatypes

buffer

are directly forked from https://github.com/vedderb/bldc

datatypes.h was adapted.

All available UART handlers the VESC can deal with can be found in the file commands.c (https://github.com/vedderb/bldc.) in the function commands_process_packet. You can write easily own handler functions. Use converting functions in the library buffer.c.

##Some details to the UART port used in the VESC

It is a uint8_t byte stream.

First byte:

0x02 for payload length of 256 byte >> next byte is for the payload length

0x03 for >256 byte payload length >> next 2 byte for the payload length

The follwing 2 bytes after the payload are the checksum. (see crc.h)

The byte stream it terminated with a 0x03.

For more details please refer also to http://vedder.se/2015/10/communicating-with-the-vesc-using-uart/