Pygame on Pi Day


Kiki’s school celebrates Pi day by allowing its students to showcase thier STEAM projects. Although Kiki was only in kindergarten I wanted her to do a project. As I scouted around the web for ideas I ran across Hello Ruby. They have a novel approach to educating young girls on computers, technology and ultimately, coding. I looked through the site and one of thier play projects was Make a keyboard. As a former keyboard nerd, I knew instantly that the project would have to be center around the computer keyboard.

The project provides a printout of stickers to stick on each letter on the keyboard. Hello Ruby, in general, is really nicely done and I even bought thier book which turns out to be a real gem. You should check it out too if you’re into teaching your kids computer programming.

Anyways, back to Kiki’s STEAM project. I have a few keyboards that I’m no longer using that are sitting and collecting dust. And I’d let Kiki do the stickers on one of them. Then I’d create a small GUI app that would show alphabets when a key on the keyboard was pressed. It would teach the kindergarten kids how simple a computer keyboard really works. It doesn’t have to be just boring alphabets, it’d show them the letters along with corresponding animals just like they have been learning in school. That would be the project.

keyboard stickers

I have an old laplop, a 2007 macbook no less, which was still sort of funtional the last time I took it to Myanmar. I would run that GUI app on it and showcase it on the Pi day. That way if the laptop dies on some unexpected event, such as a random kid accidentally knock it over, it wouldn’t be that big of a deal.

Kid checking out keybaord

Only I would have to create a GUI app. Python has several options for GUI apps including PyQt and Tkinter. I found Tkinter to be a bit low level, so I thought of trying PyQt. I quickly ran into a problem installing/compiling Qt on my 32-bit mackbook which was still on Mountain Lion. Apple dropped 32-bit support with thier later OSX releases, so I couldn’t upgrade that macbook past Mountain Lion.

So I ended up installing pygame from binary on it. That turns out saving our project whose source is on github. Besides pygame has a nice API and it was a pleasure to work with. I intend to explore more with it in the future.

alphabet animals