Instructions

PROJECT 1. LIGHTHOUSE
You will need:
micro:bit
MonkMakes Relay for micro:bit
MonkMakes 1V Bulb
Single AA battery holder and
battery
Program: P1 Lighthouse
Flash the program P1 Light House onto
your micro:bit from the following address:
https://makecode.microbit.org/_ft57YJYd7Ky5
Then connect the Relay, battery and light-bulb as shown to the right. This project
will make the light bulb blink on and off. You might like to make yourself a
cardboard structure as the lighthouse and fix the light bulb on top.
How it Works
The MonkMakes Relay for micro:bit is a kind
of electronic switch that can use a tiny
current provided by the micro:bit's Pin 0 to
control a much higher current circuit formed
by the battery and bulb.
Here is the code for the project.
First Pin P0 is turned on using a digital write
pin block. The pause block then ensures that it stays on for 1000 milliseconds (1
second) before it is turned off. There then follows another pause of 2 seconds
before the cycle repeats itself.
Turning the pin P0 on turns the Relay on that completes the circuit, allowing
electricity to flow from the battery through the light bulb, making it light up.
Page 9