Hi guys
I have been developing a remote based on RollingGeckos library (https://github.com/SolidGeek/nRF24-Esk8-Remote) and I have been trying to implement some form of cruise control. My remote uses PPM to set the speed and UART to receive data from the VESC (PPM and UART). I am getting telemetry just fine, and I was thinking that I could use the ERPM value to set the RPM over UART, like so:
VescUartSetRPM( cruiseRPM );
However this command doesn't seem to do anything, and I was wondering if this is because the PPM signal is overriding any UART commands regarding speed/rpm? If this is the case, is there any way I can activate and disable the cruise control function within the VESC over UART, while still having the VESC configured as "PPM and UART"?
Any help is much appreciated! Thanks
You can send a UART command with this tag
to set the app configuration. Your command should have the following values and data.
https://github.com/vedderb/bldc/blob/master/commands.c#L518
you should use this datatype to read and write the app configurations.
But you should read the app settings first and send it back by changing only `appconf.app_to_use` using the following data type
https://github.com/vedderb/bldc/blob/master/datatypes.h#L247
The PPM input will override the speed control command. Why don't you use UART only? One option with that would be to send the COMM_SET_CHUCK_DATA packet and use the nunchuk app, which has cruise control functionality among other things.
I have new problems. I want to control the VESC through the serial port to turn the motor forward and reverse, but I don't know how to realize it. Can you give me a way of doing it? For example, give me a piece of code? I am referring to this link to do https://gith ub.com/R0b0s hack/VESC-UA RT-Arduino.