Pick Up! Codebug
Introduction
The 'Pick up! CodeBug' game works because it is made from an incomplete electrical circuit. When the metal tweezers touch the inside of the board, the circuit is completed and shows that the game has been lost by scrolling some text.
Make sure you print out the associated files:
You should have completed the beginners CodeBug guides before attempting this guide. This activity should be supervised by an adult.
CodeBug | ||||
Micro USB cable | ||||
Computer | ||||
Crocclips | ||||
Kitchen foil | ||||
Strong card | ||||
Paper | (optional) | |||
Glue | (optional) |
Write your Program
CodeBug's legs can sense electricity by completing a circuit between its legs. Your program should detect if one of CodeBug’s legs has been connected to the GND (ground) leg and if so: scroll some text to say that the game is over.
Follow the tutorial below to create your program.
Tutorial
Creating your Board
Print out the ‘card-template’ file (or create your own!). Use the template to trace out and cut the holes in the card. Also cut out the tabs at the edge of the card, we will use these later to help it to stand up.
Glue around the holes in the card up to the edges and stick pieces of kitchen foil over them. Gently break through the kitchen foil and wrap it around the back of the card, gluing it in place.
Print out the picture template and cut out the holes. Make sure the holes in the paper align with those in the card and that the paper holes are bigger than the holes in the card.
Use the ‘container-template’ to trace out containers on a separate piece of card. Glue or sellotape these containers under each of the holes in your card.
Bend the edges of your board and either push the corner tabs through the slits, or just glue them on the inside so that your board stands on the table.
Wiring up Your Board
Connect each of the foil holes together and then connect them to leg 1 on CodeBug with the croc-clips. Finally, connect another croc-clip to the ground (GND) leg on CodeBug, leaving the other end of the croc-clip to use as the grabber. Now you’re ready to play!
Extending your game
Instead of connecting each of the foil holes together, you can connect each of them to their own leg on CodeBug so you can detect which hole was touched. You must make sure that the foil surrounding each hole isn’t touching the other pieces of foil or other croc-clips.
Follow the tutorial below to extend your program.