Blink Init
Project inception for BLINK (Bluetooth Lego Interactive Control Kernel )
Purpose & Intent
Okay, so I have had this LEGO RC car for the longest time just sitting around. I originally got it using the remainder of the per diem I received for going to the AIAA SciTech Conference, where I presented the Terp-Raptor paper.
What is cool about this car is that it has a control brick that is basically a microcontroller driving two motors. The build uses those two motors for steering and traction. This microcontroller also emits and listens to Bluetooth signals. The set comes with an app that lets you control the car over Bluetooth, but honestly the UI is pretty bad, and it just does not feel great to drive the car using that app.
Interestingly enough, I was not the only one who felt this way. There is a guy on YouTube who goes by Professor Bricks who did a ton of the hard work reverse-engineering the Bluetooth protocol used to communicate with the car. Here is the link to his really great video. He was able to get the car driving with an Xbox One controller! He also open-sourced all of his work, including the Python scripts he uses to communicate with the car through his setup. They can all be found here on his github.
Now in his setup, he used a laptop to act as the intermediate layer between the rc car and his xbox controller. I wanted to try and get rid of that computer and come up with a way for it to just be the car and controller. I wanted to not have to carry around my laptop to be able to play with this lego set the way I wanted to. As such my goals were simple:
Control the Lego RC car without having to use the stupid vendor provided application.
Initial Go
I had a nexus phone just lying around from like middle school, so I decided it was time to put that device to use again. I did a ton of research into porting linux onto the device since it was very easy to mount it onto the legoset and it easily had more than enough power to control the rc car and talk to a remote.
Now the only issue was, it was such a pain to get linux on that device, but also the bluetooth signals from the xbox 1 controller and the lego set seemed to act strangley with one another. There was a weird latency problem and I could not tell it if was because the phone had to manage sharing the bluetooth antenna with 2 devices or if it was because there was some bottleneck in how I wrote the controller code. Looking back, I think it probably was a bottleneck in the code since it was a pretty rushed job and not the best software I have written frankly.
Also I really did not like the way the nexus phone looked on the car. Since its a lego set, I wanted to keep it looking like one.
Second Go
Around this time, my steam deck had also arrived. I plan to use the steam deck as my interface for interacting with my current project SPARK. Also the steam deck runs linux and the controller and computer are basically the same device. As such I had a new plan. I was going to use the steam deck to drive the lego rc car over bluetooth!!
Next Steps
I need to figure out how to actually deploy code on the steam deck and how to interface with the steam deck’s controller interface from the linux system running on the steam deck’s processor.
