We will put a BBC Micro:bit inside the box to light it up. This will give us control using code.
This is our algorithm
for controlling the LEDs. An algorithm is a list of instructions that will achieve our goal. We write the algorithm in English.
When the Micro:bit program starts:
Display your initials and a version number.
When Pin0:
Turn ON all the LEDs.
When Pin1:
Turn OFF all the LEDs.
In Purple Mash, go to Tools | 2Code | micro:bit | Free code mircro:bit
We have successfully implemented
our algorithm
in code!
ON
and a different one for OFF
?