2.1 Humidity & Temperature Sensor
The temperature sensor measures the ambient temperature of the environment and provides real-time feedback. It is useful in environmental monitoring systems and climate control applications.

Example Applications:
- Room temperature monitoring
- Smart thermostats
- Weather stations
2.1.1 Example Code for the Temperature Sensor
- Start by plugging the temperature sensor into one of the expansion ports using the provided Type-C cable.
- Drag the
ScreenDisplayblock onto the workspace first. - Then drag the
read temperatureblock from the code block menu and insert it inside theScreenDisplayblock. - From the dropdown menu in the
read temperatureblock, select the correct pin where the sensor is connected (e.g.,P1). - This setup will:
- Continuously read the ambient temperature from the sensor
- Display the real-time temperature value on the screen module
Figure 2.1.2a: Using
read temperature inside ScreenDisplay to show values