NO Fuss Micro:bit Temperature Monitor

Using the Micro:bit & xChips assembly of this temperature monitor is effortless. Coding is a piece of cake with the blocks of software too!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Things Used in This Project

Hardware components

Software apps and online services

Step 2: Story

About The Project

This project can be completed in under 5 minutes. This tutorial will show you how to assemble and program the Micro:Bit temperature monitor with xChips. The code for this project is simple using Micro:bit's drag-and-drop platform.

Introduction

I built this temperature monitor using the Micro:Bit and a couple of xChips from XinaBox. It is a very simple and quick build. The XinaBox technology made this project extremely easy to do by eliminating the need for soldering and tools. The Micro:bit interface allows me to program easily. You can easily modify the code to add other data from the Weather Sensor, such as Barometric Pressure, Relative Humidity and Altitude.

Step 3: Assemble the Circuit

  • Click the OD01 and SW01 together using a xBUS connector (from the XC10 pack).

Figure 1: Connected SW01 and OD01

  • Click 2 xBUS connectors to the left side of the IM02 then click on the connected SW01 and OD01. Make sure that the xChips faces the same way up, so you can see the SW01 name and the IM02 name both facing up.

Figure 2: Connected IM02, SW01 and OD01

  • Use another xBUS connector to connect the MD01 to the PB04. Set aside the connected PB04 and MD01 with 3 xBUS connectors and the AA batteries.
  • Click the Micro:Bit into the IM02. Make sure the LEDs faces up - same way as the SW01 name and the IM02 name.

Figure 3: Connected IM02, SW01, OD01 and Micro:bit

  • Attach a Micro-USB connection from your computer to the Micro:Bit. Notice the yellow LED on the bottom side turning on.

Step 4: Install Package

Figure 4: Finding "Add Package"

  • Search for "weather" and click on "weather-bit" to add the package
  • Repeat points 2 and 3
  • Then paste this URL into the search bar : https://github.com/xinabox/pxt-OD01 then click on OD01 to add the package

Figure 5: Adding the packages

  • You now have all the necessary packages.

Step 5: Programming

  • Drag and drop code elements until you get something that looks like the image below.

Figure 6: The code in Blocks

  • You can also cheat and click on the "{ } JavaScript" button on the top and simply copy and paste the code into the code section below. Click on "Blocks" again to see the result.

Step 6: Compile and Test

  • Click on "Download"
  • Drag the downloaded file, typically named: microbit-Untitled.hex, to your Micro:Bit drive, typically name: MICROBIT.
  • See the result on the scrolling LED display and OLED screen.
  • Place a finger on the sensor to see the temperature go up ... hopefully! If it doesn't retrace your steps until you find the problem and correct it.

Step 7: Complete Temperature Monitor

  • Disconnect the Micro:bit from the Micro-USB connection.
  • Insert the AA batteries into the PB04
  • Use the 3 xBUS connectors to connect the PB04 and MD01 to the IM02 and SW01 as seen in the picture below.
  • Turn the switch on the PB04 on.
  • Now your Micro:bit temperature monitor is portable and ready to be placed wherever you choose.

Step 8: Code

Micro:bit `Temperature Monitor JavaScript
JavaScript code for Micro:bit Temperature Monitor. You could copy and paste as mentioned in the STORY then convert it to blocks.

let TemperatureCelsius = 0
basic.showLeds(`
    # . . . #
    . # . # .
    . . # . .
    . # . # .
    # . . . #
    `)
OLED.init(64, 128)
weatherbit.startWeatherMonitoring()
OLED.showString("Temperature Project")
TemperatureCelsius = weatherbit.temperature() / 100
basic.forever(() => {
    basic.showString("C:")
    OLED.showString("Temp_C:")
    basic.showNumber(TemperatureCelsius)
    OLED.showNumber(TemperatureCelsius)
})

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    Discussions