If you can connect to a different characteristic, and send the "commands" there, I think you should define a custom characteristic for controlling the car. NRF.setServices, and handle the onWrite event.
I imagine pretty similar to what you did previously.
And since payload for one command would be less than the packet size, the whole command arrives as one unit, command handling would be extremely simple, no need for buffering or anything like that. And not "polluting" the Nordic Uart with car control commands.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
If you can connect to a different characteristic, and send the "commands" there, I think you should define a custom characteristic for controlling the car. NRF.setServices, and handle the
onWrite
event.I imagine pretty similar to what you did previously.
And since payload for one command would be less than the packet size, the whole command arrives as one unit, command handling would be extremely simple, no need for buffering or anything like that. And not "polluting" the Nordic Uart with car control commands.