Steady Hand Game

Steady hand game introduction

The Steady hand game involves trying to get a metal wand from one side of a wavy wire to the other, without the two touching. The game works because it is made from an incomplete electrical circuit. When the metal wand touches the metal wire course, the circuit is completed and this triggers an alarm. CodeBug can sense when the circuit is completed using its legs, and can then tell the player that they have lost the game.

You will need
CodeBug CodeBug
Micro USB cable
Metal coat hanger
OR Plasticine
CR2032 battery (optional)

Write your program

Your program should simply detect if leg 1 (attached to the wavy course) has been connected to the ground (GND) leg (attached to the metal wand). If this happens, you then need to scroll a message telling the player that the game is over.

Follow the tutorial below to create your program.

Create your course

The course consists of a metal wavy path and a metal wand.

  • Get an adult to break the loop of your coat hanger and then bend it into a fun shape.

  • Attach a crocclip to one end of your coat hanger and the other clip to leg 1 on CodeBug.

  • Make a wand with another piece of wire with a loop at one end. Feed the wire through the wand loop.

  • Use plasticine to secure the two ends of the wire course, creating two bases so the course stands upright.

  • Attach a crocclip from the end of your wand to the GND leg on CodeBug.

Make sure your metal wire and wand have no sharp edges!

Extending your game

Your game now works, however if you’re not watching, a player can cheat the game, as it doesn’t make them go back to the start after they lose. To make your game cheat proof you need to detect when the game has been won, and also have a way to reset the game when it has been won or lost.

To do this you need to connect up some of CodeBugs other legs.

  • Push a croc-clip into each base (with part of the metal clip showing).

  • Connect the other ends of these two croc-clips to a different leg on CodeBug (use leg 3 for the start/reset and 2 for the end, like in the diagram below).

  • Make sure these new connections are not touching your wavy course, because this will cause your program to behave strangely.

Extending your program

Now your program needs to check if these extra clips have been touched and scroll a winning message if the winning ring has been touched, or continuously scroll "Game over" until the start/reset ring has been touched.

Follow the tutorial below to create your program.

What next

Follow the CodeBug block index activity to see if you can extend your program further, maybe add a counter to encourage players to complete the course quickly.. Or you could make a checkpoint in the middle of your course with a certain number of lives?

Take a picture of your crazy CodeBug course and share it with us via facebook or twitter, we love to see what you come up with.

Back to top