Free tools Windows power users keep installed
One-click scans. No signup required.
A BBC micro:bit can read temperature using a sensor built into its processor. In MakeCode, use input.temperature(); in MicroPython, use temperature(). Both return a Celsius value. It is a useful approximation of nearby air temperature, not a laboratory-grade measurement, because the processor can warm slightly while working.
What the micro:bit temperature reading measures
The micro:bit does not use a separate ambient-air thermometer for this reading. Its processor senses its own temperature, which can approximate the temperature around the board. The Micro:bit Educational Foundation describes it as “a fairly good approximation of the temperature around you in °C (Celsius)” in its Thermometer project.
Because the measurement comes from the processor, treat it as an estimate. The official guidance does not establish one universal accuracy percentage or sensor-resolution figure, so a precise error margin cannot be promised.
Read and show temperature in MakeCode
For a continuous display, add a forever loop and place basic.showNumber(input.temperature()) inside it. The micro:bit repeatedly reads the processor temperature and scrolls the Celsius number across its 5×5 LED display.
#1 Best Overall
- Includes the BBC Microbit V2.2 which has new speaker sensor, Built-in 25 LEDs, 2 buttons, motion sensor, buzzer, light sensor, temperature sensor, compass, radio and Bluetooth wireless features make it easy to get you started with more fun projects.
- This is an easy to use electronic board that is very versatile and can be coded many different ways. It can be integrated with other coding tools and on many platforms.
- Coding is easy with online block gui, javascript and python. Compiles to hex file, which you then copy to microbit (looks like a drive to pc)
- Box contains: 1 micro:bit v2.2, 1 USB cable, 1 battery holder, 2 AAA batteries, user guide
- Free tutorials and project ideas available on the micro:bit website. The instructions are easy to follow for a beginner to learn to code with it.
To take a reading only when needed, use an on button A pressed event and put basic.showNumber(input.temperature()) inside that event. The value is read when you press A, rather than being continuously refreshed.
The equivalent JavaScript is:
basic.forever(() => {
basic.showNumber(input.temperature())
})
Read temperature in MicroPython
Use the micro:bit MicroPython editor and this button-triggered beginner pattern:
Rank #2
- Complete classroom kit: 10-unit club pack includes everything needed to get started: 10 micro:bit v2 boards, 10 micro USB cables, 10 battery holders, 20 AAA batteries, and 10 quick start guides — ideal for coding clubs, classrooms, and STEM workshops
- Built-in sensors and outputs: Each micro:bit v2 features 25 individually programmable LEDs, 2 programmable buttons, built-in speaker, microphone, light sensor, temperature sensor, accelerometer, and compass — no additional hardware required to start learning
- Wireless connectivity and AI-ready: Supports Radio and Bluetooth communication between devices for group projects and collaborative coding; technical upgrades enable students to explore AI and machine learning concepts hands-on
- Easy to program on any platform: Compatible with desktop computers via USB (480 Mbps data transfer); program using MakeCode (block-based), Python, or Scratch; backward compatible with all existing micro:bit v1 lessons, tutorials, and code
- Compact, durable, and classroom-friendly: Each board measures just 2" x 2" x 0.4" and weighs only 69g; battery-powered for portable use; designed for ages 8+ with no soldering required, making it safe and accessible for students of all skill levels
from microbit import *
while True:
if button_a.was_pressed():
display.scroll(temperature())
temperature() returns the processor reading in degrees Celsius. display.scroll() sends the number across the LED display. The button-triggered approach avoids scrolling continuously; the MakeCode forever approach is more suitable when you want a constantly refreshed display.
Convert Celsius to Fahrenheit
The built-in temperature function returns Celsius. Convert a value using F = C × 1.8 + 32. In MakeCode, calculate that expression from input.temperature() before showing or logging it. For a button-based display, the official MakeCode Fahrenheit thermometer project uses button A for Celsius and button B for Fahrenheit, with a reusable conversion function.
Rank #3
- Microbit controller V2.21 is included!onboard comes with BLE, accelerometer, electronic compass, three buttons, 5 x 5 LED dot matrix, mainly used for teens' programming education.
- Specially designed this starter kit includes commonly used resistors, LEDs, sensors, LED segment display and more to get you started with 18 interesting projects at least.
- We have detailed tutorials (including an introduction, wiring diagram, test code, driver installation, Example Projects...... Step by step to explain how to use on our wiki page.
- Each sensor is packaged individually and then held in a beautiful plastic box with compartments, it must be the best kit for you, your friends, and electric newbies or hobbyists.
- All boards are well-packed after function, voltage and current testing. The kit is well packaged, with each item packed separately.
Improve the usefulness of a reading
- Place the board where you want to measure and leave it there for a couple of minutes before taking a reading. This gives the board time to settle in the new location.
- Put a separate thermometer in the same place and compare its reading with the micro:bit.
- If the difference is consistent, apply the measured offset in your code. Do not assume one correction will suit every board or situation.
Log readings or build a temperature monitor
Record values over USB
In MakeCode, write a labelled value with serial.writeValue("Celsius", input.temperature()), then inspect it in MakeCode’s data view. This records the Celsius readings through the USB serial connection rather than displaying each one on the LEDs.
Track minimum and maximum
For a simple range tracker, initialize variables for the current reading, minimum, and maximum. Sample every two seconds, update the minimum and maximum when a new value is lower or higher, then use button A to show the minimum and button B to show the maximum.
Rank #4
- This BBC micro:bit v2 Club kit is upgraded with a powerful new processor housing tons more capability and also adds a new speaker and microphone!
- 25 individually-programmable LEDs, 2 programmable buttons, Light and temperature sensors, Motion sensors (accelerometer and compass)
- MEMS microphone;Speaker to play audio tones
- Wireless Communication, via Radio and Bluetooth
- Package includes: 10x micro:bit v2 boards, 10x mirco USB cables, 10x battery holders, 20x AAA batteries,10x user guides
Monitor an outdoor location from indoors
With two micro:bits, the outdoor board can send its temperature() value over radio group 23 every five seconds. The indoor board receives the message, stores the latest value, and displays it. Put the outdoor board in a waterproof container; the micro:bit itself should not be left exposed to rain.
Quick Recap
Best Value
- Box Includes: 1 x official micro:bit v2.2 Board, 1 x micro USB Cable, 1 x Battery Holder, 2 x AAA Batteries, 1x Quick Start Guide
- microbit V2.2 is a tiny programmable computer, designed to make learning and teaching easy and fun!
- It's good for beginner coders, as well as advanced ones. Great to get the youth and young adults started with electronics.
- Easy to set up, easy to use. Use your imagination to use programming and electronics.
What you need
- A BBC micro:bit, or the MakeCode simulator if you are practicing the code without hardware.
- MakeCode or a micro:bit Python editor.
- A battery pack for measurements away from a computer.
- A separate thermometer if you want to compare or calibrate the reading.
- For a remote outdoor monitor, a second micro:bit and a waterproof container for the outdoor unit.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →

