Temperature sensing
The nRF52 application processor has a built-in temperature sensor. The runtime software allows you to read its measurements to get an estimate of the surrounding temperature.
Sample Code
Program Link: https://makecode.microbit.org/_b20CfMDRu5h0
Result: Leave the micro:bit on, and it should continuously display the current temperature in Celsius. The display will pause for one second (1000 milliseconds) before updating the number again.
Specifications
| Item | details |
|---|---|
| Type | on-core nRF52 |
| Sensing range | -40C .. 105C |
| Resolution | 0.25C steps |
| Accuracy | +/-5C (uncalibrated) |
| More Info | DAL Thermometer |