The BBC micro:bit was used for all our activities. The BBC micro:bit is a pocket-sized computer that can be coded, customised and controlled to bring your digital ideas, games and apps to life.
With 112 students from the A and B classes in our school, we did the following activities.
Using the micro:bit we built a temperature alarm for egg incubators. We used the temperature sensor of the micro:bit to sound an alarm and flash a light if the temperature was not appropriate. Concepts studied from physics included temperature measurement, open and closed electronic circuits, electric power, electric current, and earthing and from programming we studied the selection structure, logical operators “and / or” and event-oriented programming, and input and output.
More specifically using the Microsoft MakeCode block editor for the BBC micro:bit, we wrote a programme that monitors the temperature. If it was less than 37o C or more than 38o C, it played the note C (4 beats long) on a loop as an alarm, and scrolled the temperature on the display.
Otherwise, if the temperature was safe, it stopped playing the alarm and displayed a happy face. We set the temperature in the simulator (by dragging the arrow), to test our programme. Then we connected a buzzer using crocodile clips, explained the open and closed electric circuit and earthing and we tried a colourful LED as another output.
We pointed out that this is the principle used by a thermostat to control the central heating at home, or the climate control in many modern cars.
Then we discussed that as well as external outputs, such as a buzzer, or bright/coloured LEDs, one could also attach external inputs as sensors. We could use an external moisture sensor to detect the dampness of the soil in a plant pot. It could be used to sound an alarm to remind you to water the plants or even better the micro:bit could turn on a pump to water the plants automatically.
Then we discussed an activity we perfomed earlier this year using the light sensor of the micro:bit to switch the lights of the display on and off according to the light that falls on it. The light sensor of the micro:bit detects the light intensity falling on the 25 led display. We had made a programme which turned on a number of LEDs according to the light falling on the display, i.e. 0 LEDs when it was really bright, 1 LED when when it was bright, 9 LEDs when it started getting darker, and 25 LEDs when it was really dark. We discussed the model we had made and pointed out that this is how most modern cars have automatic systems to switch their lights on and off as the light level changes. Similarly, it could be used for an automated lamp in a room or a micro:bit could be attached to the back of a bike’s saddle to create a smart rear lamp.
The following activities were done with the 25 students of the C class.
The micro:bit was used to light up LEDs, change their brightness and play music.
We built an electric circuit with the micro: bit, using fruits, human bodies and other conductors of electricity to light up LEDs, play notes on a buzzer or our headphones and change the brightness of the LEDs. From physics, we studied the concepts of Open and Closed Electric Circuits, electric power source, electric current, earthing, electric conductors and insulators, and parallel and serial resistor connection, and from computer science the concepts of Input, Output, repetition, and Event-Oriented Programming.
We discussed how we could extend the fruit keyboard we made to make a beat box.
We also studied ‘Ohm’s Law’, which connects Voltage V, Current I, and Resistance R with the formula V=I*R. We connected a LED through a resistor at pins 3V and GND. As we increased the resistance, the LED became less bright and vice versa. In a similar way we studied the serial and parallel connection of resistors.