Login

Please fill in your details to login.





micro:bit - thermometer

This page is mainly about micro:bit - thermometer
Where we learn how to access the built in thermometer and how to plot graphs on the LED display.

The thermometer is built into the micro:bit processor - you can touch the processor to affect the temperature reading but make sure that you have 'grounded' yourself first in case you are charged up with static and blow the whole thing!

1
Challenge One (Bl/PY)
Design a thermometer that displays the temperature in digits on the display when you shake you micro:bit.

2
Challenge Two (BL/PY)
Now change so that the micro:bit plots a graph of the temperature up to 50°C.
The micro:bit should pause with the graph on the screen for 1s (1000ms) before clearing the screen. (You could try this with micropython but you will need to create a series of images for the graph and generate the graph manually - I don't *think* that micropython supports plotbargraph method in its led library).

Extension

Try outputting the temperature to the serial port so you can monitor the reading live using the simulator, REPL in Mu or a terminal window using Putty. You can either use the 'serial' blocks in the Block and Javascript editor or simply 'print' the temperature reading using micropython.

Last modified: November 15th, 2021
The Computing Café works best in landscape mode.
Rotate your device.
Dismiss Warning