UART Library for VESC #1027
Replies: 10 comments
-
Posted at 2019-05-17 by AkosLukacs If the ESC continuously sends the data, you can take a look at the GPS or the PMS7003 code. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-17 by @gfwilliams Just moved this to the interfacing forum as I think it makes sense in there. But I think you should be fine - connect to the MDBT42Q via Bluetooth (it only has one UART), then do something like:
That should print out any 6+ byte packet that begins with 2 or 3 and ends with 3 - but it's entirely possible that it might get confused by a packet that contains the byte 3 in the payload, so you may have to be a bit more clever - for instance by detecting pauses in the serial transmission. Once you have the packet itself though you can use |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-20 by Gustav Thanks for your answer, no luck sadly. My guess is that i probably need to write some data to get some data. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-20 by @gfwilliams what happens if you just do:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-21 by Gustav First it complains that i have to define both tx and rx pin, then it just prints undefined once and no data is arriving. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-21 by Gustav Found some useful information
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-21 by Gustav Here is some C code that i think does what im trying to do.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-21 by @gfwilliams
Try updating your Espruino firmware :) Ok, so it might be you have to send some data first to kick it off? If so I guess you'll need to set up a tx pin anyway |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-22 by Gustav Yeah. Quiestion is how do i send the correct data ?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-22 by @gfwilliams It looks to me like Also it seems you need to add a 16 bit CRC - so you'll need to find where the OR you could try and compile/run the code on your PC and just print out the data that it's trying to send, and then copy that data as-is to Espruino and send that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-05-17 by Gustav
Hello everyone.
I really want to get some data from the VESC (Vedders electronic speed control) via UART to a MDBT42Q Official Espruino breakout board. My only issue is that i dont realy know where to begin.
There are a few libraries already written in C. Im not so familiar with C so its hard to get some useful info out of it;
LIB1
LIB2
STM32F4 C Implementation
What i do know; the VESC communicates over UART using packets with the following format:
More detailed information here
I would like some help with where to start basicly, i just want to get data from the VESC with espruino.
There is a bluetooth module that i can hook on to the VESC aswell that has RX and TX characteristics pre programmed, so there is also a option to communicate via BLEUART.
VESC Source code
Thanks
/ G
Beta Was this translation helpful? Give feedback.
All reactions