Let’s learn Microbit! (4-Showing temperature, light level, and compass heading)

Show temperature on microbit!

Richard Lo
R Learning Journey
3 min readSep 30, 2019

--

In this lesson, you can learn how to show the temperature, light level, and also the compass heading on your microbit.

So let's start by showing the temperature.

Have you ever seen a digital clock showing the temperature? It shown by numbers, right? So we are going to do the same here. Do you remember how to show numbers? That’s right, using the “show number” block.

So first, drag the “show number” block into the forever block, because you want it to show forever, don’t put it in the start block, or it will only show the temperature when the program was started.

But if you stop here, the program will only show the number “0”, not the temperature. If you want to show the temperature, go to input and scroll down to the bottom, you will find a block called “temperature (°C)”

Then, drag the temperature block into the “0” of the show number block, and this line of code will turn into “show number temperature (°C)” download it into your microbit and it will show the temperature! (microbit can show temperature from -5°C~50°C)

Next, we will show the light level, the light level is just like the temperature, the light level block is also at the bottom of input.

Drag the light level block into the show number block and it will show: “show number light level” (the light level is from 0~225)

The last thing in this lesson is showing the compass heading, after showing the temperature and the light level, I think you all know how to show the compass heading. Find the compass heading block in the bottom of input, and drag the block in the show number block, and it will show “show number compass heading(°)”. You got it!

(Next, Let’s learn Microbit! (5-Making easy animation))

--

--