KittyCode Programming Challenge

Make a Fahrenheit  and Celsius 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

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: 

Forever.png
Temperature.png
show number.png
Need Help_ Heres a Tip.png

3 - Display Celsius with"A" button

Program your micro:bit to display the temperature in degrees celsius when you press the "A" button.  Try these blocks:  

A button.png
If Else.png
LED Small C.png
Need Help_ Heres a Tip.png

4 - 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.

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

arrow.png

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.

Try using these blocks:

Temperature.png
show number.png
Fahrenheit Equation addition.png
Fahrenheit Equation multiplication.png
roundnum.png
Need Help_ Heres a Tip.png

Mathematical!

equals.png

This is how you do it!

Times.png

Lovingly crafted!

Plus.png

4 - Display Fahrenheit with "B" button

 This is will be just like programming the Celsius to the "a" button in Step 2, but you will need Fahrenheit equation you just made! Try these blocks:

B button.png
If Else.png

Hooray! You Did It!

You made a digital thermometer!

Need Help_ Heres a Tip.png

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

Therma color.png