Input: Temperature Sensor - 图1

What Is It

The temperature sensor measures the ambient temperature, in Celsius degree (℃) by default.

How It works

The temperature sensor can convert detected ambient temperature into electrical output in the circuit. The electrical output is then transformed into a digital signal in a microcontroller. After processing the data, the microcontroller is able to calculate the temperature level (unit: ℃).
It has a measurement range from -25℃ to 100℃, with an accuracy to ±2℃. If the temperature is below a specified, adjustable value, we call it a low threshold, and we know the environment is currently cold; if it is above the value, then we call it a high threshold and we know the environment is regarded as hot.
Try using the low/high threshold to trigger events, e.g. the buzzer alarms when the temperature is high.

Real World Analogy

Thermometer

Codecraft

You can find blocks that control the temperature sensor in the tab Sensing in Codecraft.