Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probably does not work with modern firmware #25

Open
gitcnd opened this issue May 14, 2019 · 11 comments
Open

Probably does not work with modern firmware #25

gitcnd opened this issue May 14, 2019 · 11 comments

Comments

@gitcnd
Copy link

gitcnd commented May 14, 2019

For example - COMM_GET_VALUES in fw 3.55+ returns 65 bytes of data.
This code expects 54 bytes.
The crc etc will of course no longer work...

@joseguerr
Copy link

Could not make it work for FW 3.56. If Anyone knows a way of reading data from the new firmware let me know. I'll post here if i know how to do it. In the meantime what version of FW shoud I use?

@Peemouse
Copy link

Peemouse commented May 22, 2019

Give my fork a try : https://github.com/Peemouse/VescUart
It works for me with FW3.57.
However, you'll have to modify the mask for requesting the data you need as I use COMM_GET_VALUES_SETUP_SELECTIVE.
For calculating the mask, use the tool "VESC COMMUNICATION.xlsx" available here

@joseguerr
Copy link

joseguerr commented May 22, 2019

Thanks for quick the replay @Peemouse

I tried the getFWversion, but no success.. I am using an Arduino mega and used Serial1 as well Rx1 -> 19 and Tx1 ->18. Both baud rates at 115200 and did not change the mask (I know little to nothing of c or c++ but i can learn it). Pins were correctly placed and are giving me 0.5 V for Vesc RX and 3.3V for Vesc Tx. Do you have any idea what can be the problem?

Thank you once again,
José

@Peemouse
Copy link

Add UART.setDebugPort(&Serial); after UART.setSerialPort(&Serial1); in the example file getFWversion.ino. Load it on your Mega and open the Serial monitor.

@joseguerr
Copy link

joseguerr commented May 22, 2019

It is reading! Thank you so much. Also, the ground is making a poor connection with the Arduino board and the signal gets interrutped very often. I will try to read more data from other variables. In the meantime can you indicate me what are the basics of c++ that I need to know to setup up these masks values as well the structure behind this particular code? I only have experience with matlab but with a few guidelines I can learn the basics on my own. Again, thank you so much!

@Peemouse
Copy link

Well, for the mask, just use the file I linked to you.
I need to add the lines for deserialization so you'll only need to uncomment he ones you're requesting.
Let me push it.

@Peemouse
Copy link

@joseguerr please update your library with the latest version I just pushed.

@joseguerr
Copy link

I have updated the library. When using the getVescValues the rpm and inpVolts are giving me strange values. I do not have the motor connected to the VESC atm.

vesc reading (1)

Is this a common situation? Thank you once again.

@Peemouse
Copy link

@joseguerr Could you open an issue on my fork for this ?

@flegmatoid
Copy link

flegmatoid commented Jul 5, 2019

I second Joseguers conclusion. v3.58 returns huge values in both idle and running cases. Something about the packet format got changed.
I can see lots of integer overflow values (65535 etc.).

@joseguerr
Copy link

The code provided is working properly. At the time I was having issues because the grounds were not properly connected. Also, I was using Arduino Mega and one thing it worked for me was to use TX and RX 3, since 1 and 2 were not giving me any decent output. Go check Peemuse's issues, I believe that is the place where the full discussion is. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants