The many flavours of Pi

Well today was a great session at Layton Library, many thanks to Katharine for having us today.

Today we

Hacked music with Sonic Pi
Learnt how to create games with Scratch
Hacked hardware with Scratch GPIO 7
Used bananas as a keyboard

Hacked a robot to be controlled with a Wiimote

Josh, one of our young hackers is fast becoming an expert in Python and Robotics.
We used the cwiid Python library and a Poundland Bluetooth dongle to create a joypad input device that controlled the Agobo motors. The full code for this is available via our Github page.
For this project you will need

  • An Agobo robot from 4Tronix
  • A Nintendo Wiimote
  • A Bluetooth dongle (Poundland sell them)
  • A small USB hub (Again Poundland has them)
  • Install the Python library for Agobo
  • Install the cwiid python library

In an LXTerminal type

sudo apt-get install python-cwiid  

You can also install a GUI application to test your Wiimote, it's called WMGUI

sudo apt-get install wmgui  

Here is what the code looks like.

For more information on the cwiid library head over to here