Step 1: Make it
What is it?
Show how hot or cold your micro:bit is using the built-in temperature sensor.
![micro:bit showing number 9 next to a thermometer icon](https://cdn.sanity.io/images/ajwvhvgo/production/2baf587dd448d81d9b4dd24dab787dab0d8e67db-1703x1155.png?w=653&q=80&fit=max&auto=format)
Wie es funktioniert
- This program shows how hot or cold your micro:bit is by taking a reading from the temperature sensor in its processor or CPU (central processing unit).
- The processor’s temperature is a fairly good approximation of the temperature around you in °C (Celsius).
- In this program, when you press input button A, the micro:bit displays the processor’s current temperature on its LED display output.
- Take the micro:bit into warmer and colder places and see how the temperature readings change.
What you need
- micro:bit (or MakeCode simulator)
- MakeCode or Python editor
- battery pack (optional)
- a source of heat or cooling, like a fan, if you want to see the temperature change quickly (optional)
Step 2: Code it
Step 3: Improve it
- Compare the reading with another thermometer. How accurate is the micro:bit? Do you need to modify the micro:bit reading to get the air temperature?
- Convert the temperature to Fahrenheit or Kelvin.
- Use radio to make a remote sensor sending temperature readings to another micro:bit, for example from outside to inside. You could make an indoor / outdoor thermometer this way.
This content is published under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) licence.