You are here

VESC API?

4 posts / 0 new
Last post
ufechner
Offline
Last seen: 5 years 10 months ago
Joined: 2018-03-11 13:54
Posts: 6
VESC API?

Hello,

I am Uwe from Den Haag, working on Wind Drones (aenarete.eu).

Is there a documentation of the VESC API (application programming interface)?

I would like to control the set speed of a VESC, operating in speed control mode and log the actual speed,
motor current, battery voltage, battery current and duty cycle.

I would like to write a script that is executing these tests and is communicating with the VESC via
USB, but to be able to do this I need a list of the available commands, a description of the protocol
and of the data format.

Where can I find this?

If it doesn't exist, would it make sense to write such a documentation?

Thanks for your good work!

Uwe

Danny Bokma
Offline
Last seen: 3 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 53

The only real way to learn the protocol is by reading the source code and the available interface source codes from for example the arduino example communications. By the way the protocol is implemented it slightly changes when variables are added or removed. That is why you need a specific PC UI version for a specific FW version. 

I think that the most straightforward way is to work with Qt for your implementation and use the existing code from the VESC-Tool, this prevents you from making communication protocol implementation errors and allows you to easy upgrade when new versions become available.

Tilman Baumann
Offline
Last seen: 4 years 5 months ago
Joined: 2018-02-12 11:53
Posts: 49

The serial port interface is quite well documented. Various arduino libraries exist.

The source code explains all available fields.

There is also CAN, but less is exposed there and the interface is a little less obvious and not much code exists that uses it.

If you are looking for a actual API, no such thing. But the firmware code is very well structured, so you can call into the same functions that for example other control apps do as well. (I suspect you are not looking at building a custom app on the vesc controller. But this is where API as a term only really makes sense)

vimi94
Offline
Last seen: 4 years 5 months ago
Joined: 2019-04-26 16:24
Posts: 18

Dear Uwe,

I am vimarsh from Delft, I need to ask you that do you know or did you figure out a way to directly log data from vesc to computer using USB or UART cable?

Hope to hear from you soon,

Thank you