I'm using an Arduino to send data over the Serial port to my Vesc (using de <VescUart.h> library and using the setRPM function)
All good with that, the problem comes when i make a script which sends repeatedly the RPM values over Serial to the Arduino and then the Arduino sends it to the Vesc it self.
This works well if i delay each message from the following 1,25 seconds or more, less than that (1s for example) it starts to stop sometimes and if I put a delay like 0,5secs or less it just don't spin.
I thought that the problem could be the speed of the Arduino so I try first with Arduino MEGA (16Mhz) and then with Arduino DUE (84Mhz) but the results are the same.
Any one could help me? Maybe tweak something in vesctool? I would like to send messages every 0.1 or 0,2 secs
Or maybe i just need to interface a script with the Vesctool directly to get a more responsive system?
Thanks in advance