Introduction: Robo Python and Raspberry Pi
Hi Makers!
This is a simple demo to show how a raspberry pi computer can interface with a Robo Wunderkind robotics kit. Although the primary users of Robo Wunderkind are 5-10 y.o. children, grown-up makers can create next-level projects and hack their robots with our Python API :)
Equipment needed:
- A Raspberry Pi with an available USB port
- A Robo Wunderkind kit
- A BLED112 USB dongle
Robo Build: For this demo we will build a simple rover with: 2 motors, 2 wheels, 1 aux wheel, 1 RGB LED, 1 connector cube, or any spare cube you want to use, 1 system cube (see attached image for the build).
The python code uses the built-in curses library to get the keyboard data, this data is then used to control our Robo in various ways. In this demo we will have w,a,s,d to control movement, r,g,b,o(turn rgb off) to change the colour, 1 to play the honking sound, and f to force stop everything.
The code is attached in the next step so you may copy paste and run to see for yourself.
Some modifications you can make:
1 - figure out how to get curses to detect and accept no key press as a state; then use this to stop movement so you must press and hold w,a,s,or d in order to move continuously 2 - add other keys to control more features like the rest of the avaialble sounds, a second LED or even the LED matrix 3 - use the Raspberry Pi GPIO pins to add additional hardware to your controller, beyond the keyboard.
We hope that this has helped get you started with Raspberry Pi and Robo Python, we're excited to see what projects you create with Robo Wunderkind! :)