top of page
KittyCode Programming Challenge

Make a Simple Thermometer With Your micro:bit

Program your micro:bit so you can use it as a thermometer. Every computer processor is equipped with a digital temperature sensing device. Computers need it to monitor their temperatures. You can utilize the micro:bit's temperature sensor to read the temperature of the surrounding environment

Therma color.png
New project.png

1 - Start a new project in MakeCode

Go to "MakeCode.microbit.org" to start a new project by clicking the new project icon above. Click the purple plus box labeled "New Project" to begin.

2 - Display temperature in Celsius 

Program your micro:bit to display the temperature in degrees celsius . Try these blocks: 

1_basic.png
2_Input.png
Forever.png
Temperature.png
show number.png
Need Help_ Heres a Tip.png

3 - Convert Celsius to Fahrenheit 

You want your thermometer to give readings in Fahrenheit, but the micro:bit will only give you Celsius. What should you do? Use mathematical functions to convert Celsius to Fahrenheit. But beware, computers are so good at doing math that you will get answers with up to 9 decimal places! So, you will want to tell the computer to round its answers to the nearest whole number.

arrow.png

I don't know man. That looks REALLY hard ...

Temperature conversion equation:

F to C.png

Why is that the equation? One degree C is equivalent to 1.8 degrees F. and the scales are offset by 32 degrees.

Need Help_ Heres a Tip.png

Try using these blocks:

2_Input.png
Temperature.png
1_basic.png
show number.png
9_Math.png
Fahrenheit Equation addition.png
Fahrenheit Equation multiplication.png
roundnum.png

4 - Make LEDs Show the Units of Measurement 

Now you can enhance how your micro:bit displays its' reading. Make the LED lights show a degrees F label after the scrolling number. Then pause and clear the screen. This will help you read the micro:bit more clearly and easily.

Try using these blocks:

1_basic.png
Clear Screen.png
Basic More.png
Pause.png
Need Help_ Heres a Tip.png

Hooray! You did it!

If you need help, click me to see the finished product!

Therma color.png
bottom of page