How To Make Thermometer Using Micro Bit ?

 Track highest and lowest temperatures by leaving this program running on a micro:bit.

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 – or take the micro:bit outside
  • Code It
from microbit import *

currentTemp = temperature()
max = currentTemp
min = currentTemp

while True:'.')
    currentTemp = temperature()
    if currentTemp < min:
        min = currentTemp
    if currentTemp > max:
        max = currentTemp
    if button_a.was_pressed():
    if button_b.was_pressed():

Leave a Reply

Your email address will not be published. Required fields are marked *