Fancy Building Your Very Own BBC micro:bit Robot Controller?
Some genius, going by the moniker Penguin Tutor, has used the BBC micro:bit's accelerometer to control a homemade Raspberry Pi robot. The results are awesome. As you will see below, Penguin Tutor has written a code that not only allows him to move a Raspberry Pi robot around a room using the micro:bit's accelerometer, but also shows which point on the accelerometer's axis the micro:bit is pointing towards.
It’s pretty technically complex stuff; if you have just received your micro:bit and aren’t familiar with Python language this could be a project a little out of your reach. But that shouldn’t stop you trying! And if you're familiar with the intricacies of coding using Python, get in touch and let us know if you have any similar projects using Raspberry Pi and the BBC micro:bit. We'd love to feature them!
The tech-wizard uses a used another, Linux computer to act as a proxy / relay server to receive the status of the micro:bit and then pass it on to the Raspberry Pi on the robot. Think you could do that with a Raspberry Pi and Block Editor? If you think so, see if you can figure out how to do it from Penguin Tutor’s hints. (And then let us know how you did it!) Penguin Tutor has kindly set out how to pass messages between the Raspberry Pi and the BBC micro:bit, so get going!
To replicate this project, you’ll need some items from our list of micro:bit essentials, such as a micro USB cable, etc. If you're particularly adept with coding (and are feeling adventurous) You could also try and adapt Penguin Tutor’s original Raspberry Pi robot project and adapt it to function solely with a micro:bit. Fortunately, there's a detailed guide for those willing to take the plunge.
Check out a video on the project here:
Read more about the project, and find a link to the source code for both the miro:bit and any Linux computer, on Penguin Tutor’s website.