Getting started with Physical Computing using a micro:bit


For this tutorial you will need:

Step 1

Place a heat proof mat under your silicone mould. Into one of the shapes carefully fill with about 1/4 of melted glue. Insert the LED into the hot glue with the feet sticking out and fill up the rest of the shape.

Repeat with the remaining shapes one at a time using a different colour LED each time.

In this photo I have used a cheap hot glue gun and glue from Hobby Craft which is transparent when melted and opaque when cooled. I used an Easter Egg shaped mould as I wanted the finished shapes to look like dragon eggs.
Stacks Image 1243

Step 2

Once the eggs have cooled carefully remove them from the container. You may want to use a knife or sharp pair of scissors to trim any excess glue from around the eggs.
Testing the LEDs

  • To check the LEDs are working simply place the long led of the LED (anode) to the 3V pin on the micro:bit and the short leg to GND on the micro:bit
Stacks Image 1282

Step 3

Connecting the LED to the mirco:bit

In this photo I have simply connected a wire to each of the legs of the LED and wrapped them around pin 1 and ground on the micro:bit. You can use crocodile clips if you prefer.
Stacks Image 1335

Step 4

Make the LED flash

In this very simple I am going to make the LED flash on and off using block editor.

Stacks Image 1427
In this example,

the first digital write sets Pin 1 (P1) to on (1)
the second digital write sets Pin 1 (P1) to off (0)
The LED is then switched on for 300 ms
Stacks Image 1422

For more Harry Potter themed micro:bit lessons check out this resource here