BBC micro:bit Steady Hand Game

How cool are you under pressure? Think you’ve got steady hands? Use this guide to build a course and test your mettle!

 

Sam was kind enough to write the code and guide – what a kind guy! This game involves trying to get a metal wand from one side of a wavy wire to the other, without the two touching. The principle of the project is that it works because it is made from an incomplete electrical circuit; when the wand touches the metal wire a circuit is completed and the alarm programmed into the micro:bit is triggered! The micro:bit can sense when the circuit is completed using its input / output rings, and will tell you when you’ve lost the game, and at the same time it will make a buzzer buzz. We based our code and design on this great activity by Codebug. Codebug is a really interesting little device, which is quite a lot like the micro:bit. With a little bit of research you might find out why....

 

For this project you will need:

Project Time:  35 minutes
Skills required: Electronics, Coding, Craft, Steady Hands
Age: 11+
Difficulty Level: Advanced

1

First, you need to construct the course. To make the wavy course deconstruct a wire clothes hanger (get an adult to help with this bit if you want). Cut about 5cm off one of the ends and set it aside, you'll need it in a moment.

Then bend the rest into a fun shape – this is your course. Make it as angular (difficult) or gentle (easy) as you like! As long as it has a clear start and an end. As you can see, our course was pretty tough!

2

Attach a crocodile wire to one end of the clothes hanger and the other end around the Pin 0 ring on the micro:bit. As with most projects, it will be best to pick a few different colours for the crocodile wires that you'll be using for this steady hand game otherwise things might get confusing!

 

3

Now it's time to pick up that piece of extra wire you cut off the course in Step 1. It's going to become your wand. 

First, you need to bend a small piece of one end of it, turning it into a loop. Then put some plasticine around the other end so that the metal doesn’t have to be held directly. Thread the wand loop over the wire, like pushing thread through the eye of a needle.

4

Use plasticine (normal sticky tac will work, but if you're feeling adventurous why not make some insulating dough!) to secure the two ends of the wavy course to whatever surface you've put it on, creating two bases so the course stands up. Give it a little poke to make sure it's steady!

5

Now you need to take another crocodile wire (a different colour to the first, if you have a few colours) and attach the wand to the GND ring of your micro:bit. If it's difficult to clip the crocodile wire onto the wand, cut the end of the crocodile wire off (the clip part) and strip about 1cm of the casing. Then you can wrap the wire directly around the wand. Get an adult to help you with the stripping of the crocodile wire, if you want.

6

Finally, take two crocodile clips and your buzzer. Use one to connect the buzzer's red fly lead (or red wire, if you aren't a nerd like us) to Pin 1 on the micro:bit. Use the other to clip the black wire from the buzzer onto the bottom of the crocodile clip in the GND ring. Now you can see why it's handy to have many coloured crocodile wires!

7

Now you need to write your program It needs to detect if the Ground ring (GND) (attached to the wavy course) has been connected to Pin 0 (attached to the metal wand). If this happens, the buzzer needs to buzz, letting the player know they’ve touched the course. To achieve this you will need to have the micro:bit digital write to Pin 1. This will power it up (but only for a short time -- otherwise the buzzer won't stop buzzing!) In addition, an image, such as a big red cross, should flash on the LEDs.

If you’re feeling lazy or need a hint, check out our code by downloading it. You can then import it into Block Editor, mess about with the code, and see if you can improve it!

Flash the program into your micro:bit, get your micro:bit fired up with some batteries, take a deep breath and give the course a go!

Extra Thoughts

Why not change the code to make the micro:bit display how many times the player has touched the course on its LEDs! Then you could keep score and see who has the steadiest hands.

You could also substitute the buzzer by hacking a pair of headphones and using Block Editor, MicroPython, or your choice of code, to make the micro:bit play a buzzer noise (or any noise you want) when the wand touches the course.