✨ Use RCAPP and get 5% off 👇
Skip to content
Free Delivery on Orders Above Rs 999/- Pan-India
Cash on Delivery Available for Orders above Rs.500/- and Upto Rs 3000/-
SAVE more when you BUY more. Upto 30% Off on BULK PURCHASE
GST Invoices for Your Business
Dedicated Technical Support Team
Safely Delivering Genuine Products PAN INDIA

How to Create a Digital Thermometer using Micro:Bit

How to Create a Digital Thermometer using Micro:Bit
-
Written By - Robocraze -
📅 Updated on 07 Jul 2025
Summarize with AI
✅ Prompt copied

Summary

A digital thermometer project using a BBC micro:bit is an excellent way to learn about sensors and programming while creating something useful for everyday life. If you've never worked with temperature sensors before, this blog will guide you through the entire process.

In this post, we will go step-by-step through creating your own digital thermometer project. Don't worry if you have never done sensor programming before. We will use simple drag-and-drop blocks, just like putting puzzle pieces together, to read temperature and display it clearly.

How to Create a Digital Thermometer using Micro:Bit

What Materials Are Needed for a Micro:Bit Digital Thermometer?

The wonderful thing about this digital thermometer project is that you need very few components. Here is a simple list of everything required:

  • A BBC micro:bit (V1 or V2): This is the small computer that will read temperature and display the results. The micro:bit V1 or micro:bit v2 has a built-in temperature sensor, so no extra sensors needed!
  • A Micro-USB Cable: This is the same kind of USB cable used to charge many Android phones. It will connect the micro:bit to your computer for programming.
  • A Computer with Internet Access: We need this to write our code using the online MakeCode editor. Any basic laptop or desktop will work perfectly.
  • A Battery Pack (Optional): This is not needed for programming, but if you want a portable thermometer that you can carry around, you will need this to power it without a computer.

Components and Supplies

BBC Micro:Bit V2.2 Go Kit – Micro:bit V2.2 kit with accessories. -Development Board -BBC Micro:Bit -RobocrazeBBC Micro:Bit V2.2 Go Kit – Micro:bit V2.2 kit with accessories. -Development Board -BBC Micro:Bit -Robocraze

BBC Micro:Bit V2.2 Go Kit

BBC Micro:Bit V2.2 Go Kit If you are looking to start programming or would like an exciting device to get young people interested in coding, then the BBC micro:bit V2.2 is perfect for you. The micro:bit Go box contains the micro:bit computer along with...
Rs 1,761/-
Rs 1,761/-
Rs 2,499/-
Save Rs 738/-
2x AAA Battery Holder – AAA battery holder with switch. -Development Board -BBC Micro:Bit -Robocraze2x AAA Battery Holder – AAA battery holder with switch. -Development Board -BBC Micro:Bit -Robocraze

2X AAA battery Holder for Microbit (134)

2 x AAA Battery Holder with cover and On/Off Switch This AAA x 2 battery holder is enclosed in plastic and comes with a cover and an on/off switch, making it a great addition to any battery-powered project. The removable sliding cover is secured...
Rs 26/-
Rs 26/-
Rs 44/-
Save Rs 18/-
Micro:bit USB 2.0 Micro B Cable 300mm High-Speed Data Cable - GreenMicro:bit USB 2.0 Micro B Cable 300mm High-Speed Data Cable - Green

    Micro:bit USB 2.0 Micro B Cable 300mm High-Speed Data Cable - Green

    Micro:bit USB 2.0 Micro B Cable 300mm High-Speed Data Cable - Green This USB Type A to Micro B cable is the perfect choice to power and transfer data to your micro:bit. It is 300mm long (0.3m), making it easy to use without extra...
    Rs 172/-
    Rs 172/-
    Rs 249/-
    Save Rs 77/-
    Robotbit micro:bit Expansion Board base Plate (223)Robotbit micro:bit Expansion Board base Plate (223)

      Robotbit micro:bit Expansion Board base Plate (223)

      Micro:Bit V2.2 Expansion Board Holder (Color May Vary) Micro:Bit Development Expansion Board Holder is compatible with Micro: bit, LEGO. The holder comes with good quality plastic material.  The dimension of this Holder is (length x breadth x height) 88 x 64 x 13mm and...
      Rs 408/-
      Rs 408/-
      Rs 699/-
      Save Rs 291/-
      Official Micro:Bit Wearable Accessories – Flexible holder & adjustable strap -BBC Micro:Bit -RobocrazeOfficial Micro:Bit Wearable Accessories – Flexible holder & adjustable strap -BBC Micro:Bit -Robocraze

        micro:bit wearable (single) (202)

        Official Micro:Bit Wearable Accessories Flexible Holder and Adjustable Strap The official micro:bit wearable lets you securely connect your micro:bit to a battery pack using a flexible holder. With an adjustable strap, you can attach it to your wrist, ankle, or other objects. Perfect for...
        Rs 290/-
        Rs 290/-
        Rs 449/-
        Save Rs 159/-
        Micro:Bit Robotbit IOBIT V2.0 – Robotbit IOBIT V2.0 board. -Development Board -BBC Micro:Bit -RobocrazeMicro:Bit Robotbit IOBIT V2.0 – Robotbit IOBIT V2.0 board. -Development Board -BBC Micro:Bit -Robocraze

          Micro:Bit Expansion Board Robotbit IOBIT V2.0

          Robotbit IOBIT V2.0 Micro:Bit Expansion Board This is a low-cost expansion board for Micro:Bit, which is specifically used for easy access of the IO ports on the Micro:Bit. It breaks out all the IO contacts on the Micro:Bit and comes with a built-in buzzer. The...
          Rs 396/-
          Rs 396/-
          Rs 640/-
          Save Rs 244/-

          How to Set Up a BBC Micro:bit?

          Setting up the BBC micro:bit for digital thermometer temperature reading is very straightforward. Just follow these simple steps to get it ready for coding.

          • Connect Your micro:bit: Take the micro-USB cable and connect one end to your micro:bit and the other end to a USB port on your computer. You should see some lights flash on the development board, and it will appear on your computer like a USB pen drive, usually called 'MICROBIT'.
          • Open the MakeCode Website: On your computer, open your web browser (like Chrome or Firefox) and go to makecode.microbit.org. This is the free online code editor we will use. It's made by Microsoft and is perfect for beginners.
          • Start a New Project: On the MakeCode homepage, click on the big purple box that says '+ New Project'. Give your project a descriptive name, like "Digital Thermometer," and click 'Create'. You will now see the coding screen with a virtual micro:bit on the left.

          That's it. Your setup is complete and ready for temperature programming.

          How Do You Program/ create a Digital Thermometer on the Micro:bit?

          creating a program for digital thermometer on micro:bit

          We will now tell our micro:bit development Board how to read the temperature and display it clearly. We will use the block editor to drag and drop the blocks I mention into the coding area.

          Step 1: Display Temperature Continuously

          The simplest way to create a digital thermometer is to show the temperature reading all the time.

          • From the Basic category (blue), find the forever block. This block runs its code over and over again, which is perfect for a thermometer that should always show current temperature.
          • From the Basic category, drag the show number block and place it inside the forever block.
          • Now, from the Input category (pink), find the temperature (°C) block. This special block reads the micro:bit's built-in temperature sensor. Drag it and drop it into the show number block.

          Your code should now look like this: The micro:bit will continuously read the temperature and display it on the LED screen.

          Step 2: Add Temperature Units Display

          Let's make our thermometer more professional by showing the temperature unit.

          • From the Basic category, drag a show string block and place it below the show number block inside the forever loop.
          • Click on the text area in the show string block and type "°C" (or just "C" if you prefer).
          • Now add a pause block from the Basic category and set it to 1000 milliseconds (1 second).

          This gives people time to read the temperature digital thermometer before it updates.

          Step 3: Add Button Controls for Different Units

          Let's add the ability to switch between Celsius and Fahrenheit using the micro:bit buttons.

          • For Button A (Celsius): From the Input category, drag out an on-button A pressed block. Inside it, place a show number block with the temperature (°C) block, followed by a show string block displaying "°C".
          • For Button B (Fahrenheit): Drag out an on-button B pressed block. For Fahrenheit, we need to convert from Celsius. From the Math category, create this formula: (temperature (°C) × 9 ÷ 5) + 32. Place this inside a show number block, followed by a show string block displaying "°F".

          Step 4: Add a Startup Message

          Let's make our thermometer user-friendly by showing instructions when it starts.

          In the on-start block (already in your workspace), add these blocks:

          • show string "THERMOMETER"
          • pause 2000 milliseconds
          • show string "A=°C B=°F"
          • pause 2000 milliseconds

          Step 5: Download the Code to Your Micro:bit

          Your digital thermometer is complete! Click the big purple Download button at the bottom of the screen. A file will be saved to your computer. Drag this file from your Downloads folder onto the 'MICROBIT' drive. The light on the back of your micro:bit will flash, and once it stops, your thermometer is ready to use!

          How Does the Micro:bit Know the Temperature?

          How Does the Micro:bit Know the Temperature

          You might be wondering how this temperature magic works. The micro:bit has a built-in temperature sensor that's actually part of the main processor chip. This sensor measures the temperature of the micro:bit itself, which gives us a pretty good estimate of the surrounding air temperature.

          The digital thermometer sensor reads temperature in Celsius and can detect temperatures from about -25°C to +75°C (-13°F to +167°F). It's accurate to within about 4°C, which makes it great for learning and basic temperature monitoring, though not quite as precise as professional thermometers.

          How Can I Improve My Digital Thermometer?

          Now that you have a basic digital thermometer, here are some ideas to make it even better:

          • Add Temperature Alerts: Use if blocks from the Logic category to check if the temperature is too hot (above 30°C) or too cold (below 10°C). Make the micro:bit show a warning icon or play a sound.
          • Create a Min/Max Tracker: Use variables to store the highest and lowest temperatures recorded. Add button combinations (like A+B together) to display these values.
          • Add Visual Temperature Scale: Instead of just numbers, create a visual bar graph using the plot bar graph block from Led category to show temperature as a rising or falling bar.
          • Make Temperature Logging: Create a simple data logger that stores temperature readings over time, which you can view by scrolling through with buttons.
          • Add Comfort Indicators: Program different LED patterns or icons to show if the temperature is comfortable, too hot, or too cold for different activities.

          Conclusion

          Congratulations! You have successfully built your very own digital thermometer project from scratch. You learned how to use the micro:bit's built-in temperature sensor, how to display real-time data, and how to create user-friendly controls with buttons. The best part about the micro:bit is that you can always modify the code and experiment with new features.

          Excerpt

          Setting up the BBC micro:bit for digital thermometer temperature reading is very straightforward. Just follow these simple steps to get it ready for coding.

          Frequently Asked Questions

          Can the Micro:bit measure temperature on its own?

          Yes, the Micro:bit can measure temperature without any external hardware. It has a temperature sensor built directly into its main processor chip. This allows you to create a fully functional digital thermometer using just the Micro:bit board itself.

          Is the Micro:bit temperature sensor accurate?

          The Micro:bit's built-in sensor provides a good estimate of the ambient temperature, generally accurate to within about ±4°C. Since it measures the temperature of the processor, its readings can be slightly influenced by how hard the chip is working. It is excellent for educational projects and general temperature monitoring but is not a substitute for a precision scientific instrument.

          How is temperature displayed on the Micro:bit?

          Temperature is typically displayed numerically by scrolling the value across the device's 5x5 LED matrix. This can be programmed to show the number followed by its unit (e.g., °C or °F). For a more visual approach, you can also program the LEDs to display a bar graph that rises and falls with the temperature.

          Can I convert Celsius to Fahrenheit on the Micro:bit?

          Yes, converting temperature units is a straightforward programming task on the Micro:bit. The sensor natively reads the temperature in Celsius, but you can easily implement the standard conversion formula, (°C × 9/5) + 32, using the math functions in a code editor like MakeCode to display the temperature in Fahrenheit.

          How to log or save temperature data from the Micro:bit?

          You can program the Micro:bit to perform simple data logging by storing temperature readings in variables or a data structure called an array. While it lacks long-term storage, this method allows it to keep a temporary record of measurements over time. You can then program the buttons to scroll through this saved data on the LED display to review past readings.

          Prev Post
          Next Post

          Leave a comment

          Please note, comments need to be approved before they are published.

          Thanks for subscribing!

          This email has been registered!

          Shop the look

          Choose Options

          Edit Option
          Back In Stock Notification
          Compare
          Product SKU Description Collection Availability Product Type Other Details

          Choose Options

          this is just a warning
          Login
          Shopping Cart
          0 items
          FREE SHIPPING!
          ₹100 OFF
          ₹200 OFF
          ₹999
          ₹2500
          ₹4900
          WhatsApp Chat Chat