Steady Hand Game
Build yourself a game that would test your composure and your fine motor skills. Finish the obstacle course without touching the steel wire. Don't get anxious while playing. Play at your own risk!
• 1 x Micro:bit
• 1 x Sensor: bit breakout board (breakout board with in-built buzzer)
• 3 x F-F wires
• 1 x GVS LED Strip
• Thin steel wire
• Aluminium foil
• 2 x Disposable cups
• Cardboard sheet
• 2 x Thick Straws
• Hot glue Gun
Connection. Since P0 is used for in-built buzzer, we will connect the first F-F wire to the signal pin of P1. Then use a black jumper wire to connect to P1 ground. Use another jumper wire of another colour (in this case brown) to connect it to the signal pin of P2. Grab a GVS LED strip and connect it to P3.
The way this game works is if the signal pin of P1 and GND (ground) comes into contact, it will form a close circuit - like a switch. Same goes to signal pin of P2 if it comes in contact with GND. Just with a different output. On the later steps, we are going to connect steel wire to the Signal pin of P1 throughout the course of the game. Only at the end point, the Signal P2 will be present to be the finishing point. Keep in mind.
Making the game. Cut out rectangular cardboard big enough to place micro:bit and the breakout board on top. The cardboard will be the base for this game. The measurements are about 30cm x 10 cm. You might want to cut out 2 circular holes slightly smaller than the cup, where the cups are glued later on.
Grab your long steel wire and wrap aluminum foil over the steel wire. wrap it securely around the steel wire. Then bend the wires to your desired obstacle course shape. Make it complex if you want, but don't make it impossible!
We wrap the wires as stainless steel is a poor conductor compared to most metals. Aluminium is a very good conductor of electricity. Due to its high conductance, light weight, and corrosion resistance, high-voltage overhead power lines are generally made of aluminium.
Glue 2 straws into the bottom of the cups this way. This way, it provides a stable support for the steel wire. It is also to make the start and the end insulated from any unwanted contact so as not to trigger the buzzer wrongly. you could use a straw and cut in half, but for demo purposes, We used 2 straws do differentiate the colour.
Hot glue the steel wire ends into the straws, and through the cup. Then position the cups to the board and adjust how you want it to look like.
Poke a hole somewhere in the middle of the first cup, so that the red jumper wire can pass through. Connect the Red Jumper wire to the steel wire that is the starting part.
For the P2 brown jumper wire, connect a shorter steel wire to it, then coil the wire around the yellow straw. Add aluminium foil on the coiled metal to increase conductivity. Make sure the metal parts that is connected to the brown jumper wires do not touch the obstacle course from P1.
Glue the 2 cups onto the cardboard. Remember to adjust and turn around the cups first, so that the obstacle course is stable and standing when the cups are glued.
For the handle, use a shorter steel wire, make a loop and wrap it around with aluminium foil to increase conductivity (optional). Take note you want to wrap the foil first then make a loop around the straw big enough for the handle ring to go through. Make the handle with a shorter wire and twist it to make a loop. Connect the wrapped steel wire to the Black wire of P1, which is connected Ground.
Add GVS LED strip, stick it on the cardboard where there is space, and connect it to P3. Then double sided tape it to the cardboard, then tape the breakout board in the middle of the board. Now you are done with the making, on to codes now!
Open the MakeCode for micro:bit, On start, just show an icon, just to make sure your micro:bit is working. Go to extensions and download: neopixel to declare the LED light strip. Then set the strip to P3 with 10 LEDs.
Then on the forever loop, Drag down an if else loop. Drop down if P1 is pressed and if P2 is pressed accordingly. if neither of these pins are triggered, just add an icon to show it.
Then drop down the 2 different colours you want your game to show if it hits the obstacle course or the end of the course.
Do note that some of the colours does not reflect correctly, so do trial and error to see what colour do you want, just make sure that the colours display when it touches the obstacle and the end point are different.
Remember the in-built buzzer in the breakout board, now it is easier as you don't need to add on external buzzer. Furthermore, the in-built buzzer at P0 is loud and stable. So to code it, go to music and just add a tone if the handle touches the obstacle, and a melody repeating once if you completed the game. Then flash it into your micro:bit and you are ready to play!