O'Reilly logo

Raspberry Pi For Dummies by Mike Cook, Sean McManus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Blastoff Game

Blastoff is a marble maze/puzzle type game that can sense the presence of the marble at various parts of the board. The idea is to visit each one of a series of traps or positions in the correct order without running into the sides. The best thing is that you know all you need to know about electronics to make this now.

To build this game, you use a 15mm (3/8") ball bearing in a box, using copper foil strips to sense the position of the ball. The copper foil strips are connected to the GPIO inputs and ground and the ball bearing simply shorts two strips together, thus grounding the pin and allowing the computer to read it. When each numbered trap is visited, the Raspberry Pi plays a sound file enunciating that number in the countdown. If the ball bearing touches the side abort strips or if traps are visited out of order, however, the computer resets the game and you have to start the countdown again. This is great fun, especially at a party or with a group of friends.

Making the box

We used metric nuts and bolts to make this game, specifically M2.5 and M3 nuts and bolts. In imperial measure, these correspond to BA sizes, with M2.5 being roughly 6BA and M3 corresponding to 4BA. Fortunately, absolute sizes do not matter in making this project, so feel free to use whatever system is available to you.

To start off, you need a playing surface. We built most of this from 6mm (1/4") plywood finished in varnish, a sheet of acrylic, and some pine wood strips. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required