Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bbc microbit Lesson 3 – Temperature hot medium.

Similar presentations


Presentation on theme: "Bbc microbit Lesson 3 – Temperature hot medium."— Presentation transcript:

1 Bbc microbit Lesson 3 – Temperature hot medium

2 temperature You will learn how to get the ambient temperature (degree Celsius °C). The temperature is inferred from the the surface temperature of the various chips on the micro:bit. We will be learning how to get the temperature using on shake, local variables, as well as simple commands such as show number.

3 Temperature

4 Temperature First setup the variable temp and set it to 0, here we are telling the Micro:bit that the variable is a integer data type. Can you remember what that means? You then need to insert an input this can be shake or on button pressed.

5 Temperature Setup the input so that our Microbit will work out what the temperature is when you shake or press a button, this will then be stored in the temp variable. Finally ask your Micro:bit to show the temperature by inserting the show number code and linking it to the variable temp.

6 Temperature Run your code to see what happens, move around the room to see if the temperature changes. You should now know how to put files onto your Micro:bit.

7 Temperature Extension Challenge 1 –
Add 1 IF statement to your code so that IF the temperature is more than (>) 26 your Micro:bit displays ITS HOT! Add 1 Else IF statement to your code so that IF the temperature is less than (<) 17 your Micro:bit displays ITS COLD! Add 1 Else statement to your code so that Else the Micro:bit displays GOOD TEMPERATURE.

8 Temperature Challenge 2 –
Add images to display to your screen a Celsius sign.


Download ppt "Bbc microbit Lesson 3 – Temperature hot medium."

Similar presentations


Ads by Google