Case 14: Weather Detection Robot
Introduction
Use the Jacdac temperature & humidity sensor to build a portable weather detection station. Press button A to read the current air humidity via serial output and display it; press button B to read the current temperature and display it. The program continuously monitors the environment automatically: when humidity exceeds 80, the LED matrix displays 「✕」 and a buzzer alarm sounds (excessive humidity); when temperature exceeds 33, it displays a frowny face and a buzzer alarm sounds (excessive temperature).
Learning Objectives
- Learn about the temperature & humidity sensor — a fundamental sensor for meteorological observation.
- Understand the threshold alarm mechanism — triggering audible and visual alarms when sensor readings exceed set limits.
- Explore the basic elements of meteorological observation and the data sources behind weather forecasting.
- Learn multi-tasking concurrency — button queries + automatic monitoring running simultaneously.
Required Materials
| Item | Image | Quantity |
|---|
| micro:bit V2 | .png) | 1 |
| Jacdac Expansion Board |  | 1 |
| Jacdac 25cm Connector Cable |  | 1 |
| Jacdac Temperature & Humidity Sensor |  | 1 |
| USB Cable |  | 1 |
Sensor Principle
Temperature & Humidity Sensor
The Jacdac temperature & humidity sensor integrates both temperature and humidity detection functions, capable of simultaneously outputting ambient temperature and air humidity values.
| Measurement | Threshold in This Case | Description |
|---|
| Temperature | > 33°C (alarm) (Note: the 33°C threshold can be adjusted based on local climate) | Temperature too high → LED shows frowny face + buzzer alarm |
| Humidity | > 80% (alarm) | Humidity too high → LED shows ✕ + buzzer alarm |
Temperature and humidity are closely related — as temperature rises, the air's capacity to hold water vapor increases. Hot and humid weather feels oppressively muggy ("sauna weather"), which is why these two parameters are the most critical in meteorological observation.
Assembly Steps