This program is simple but fun. Students will use the Micro:bit's internal compass to detect magnetic fields.
Which unexpected objects have magnetic fields? Be sure to document your findings.
The code
In this simple program, students will make a circuit and light up an LED. Pins are below advanced under the blocks.
LEDs will only light if the positive (long end) is connected to the positive on the Micro:bit (0)
This is a good opportunity to introduce breadboards, an easy way to make circuits without soldering. (The name comes from the fact that people used to use actual bread cutting boards for this!)
You can also make your two lights flash!
No resistor
Resistor
Same circuit with no breadboard
(Bright light is 255)
Simplest alarm (One Led Alarm.) When the Microbit is in the dark, the green light is on. When exposed to light, the green LED shuts off and an alarm sounds.
Light meter with one light.
Light alarm
Burglar alarm using LEDs and a speaker.