pxt-microbit
Version:
micro:bit target for Microsoft MakeCode (PXT)
33 lines (21 loc) • 979 B
Markdown
measure the temperature on the @boardname@.
Temperature
* [activity](/lessons/temperature/activity)
* [challenges](/lessons/temperature/challenges)
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 @boardname@. We will be learning how to get the temperature using on shake, local variables, as well as simple commands such as show number.
## Documentation
```cards
input.temperature()
let x = 0
basic.showNumber(7)
basic.showString("Hello!")
input.onGesture(Gesture.Shake, () => {})
```
* learn how to create a variable to store data
* 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 @boardname@.
* learn how to show a number on the LED screen