Project 13 XGO Meteorological Station
Ⅰ. Teaching Aims
Use
fb temperature/fb humidityto obtain the real-time temperature and humidity.Scroll or statically display values on a 5 × 7 LED dot matrix.
When the temperature/humidity exceeds the threshold, the built-in action of XGO is performed.
Understand temperature unit conversion (℃ ↔ ℉) and digital formatting.
Ⅱ. Pre-class Check
XGO + Foxbit + MicroBlocks IDE.
XGO battery power ≥ 60 %.
MicroBlocks status bar shows a green dot, XGO-lite extension is loaded and the development board model is Foxbit.
Ⅲ. Key Blocks Analysis
|
|
|---|---|
Functions |
Return to ambient temperature (℃) |
Tips |
DHT22 resolution is 0.1℃, DHT11 is 1℃ |
|
|
Functions |
Return to ambient humidity (%) |
Tips |
DHT11 ≥ 1s sampling, DHT22 ≥ 0.5s |
|
|
Functions |
Temperature unit conversion |
Tips |
℉ = ℃ × 1.8 + 32 |
|
|
Functions |
Scroll to show the string to the LED dot matrix |
Tips |
The smaller the |
|
|
Functions |
Static display string |
Tips |
Text that is too long will be automatically truncated |
|
|
Functions |
Built-in body shaking action |
Tips |
|
|
|
Functions |
The body slides up and down (like breathing) |
Tips |
Z, positive for up, negative for down |
Ⅳ. Test 1: LED Scroll Temperature + Humidity
Scroll “
26 °C 58 %” once per second.

Online code: Click here
Ⅴ. Test 2: Action of Humidity Threshold
Humidity > 50 % →
Wave Bodyas a reminder

Online code: Click here
Ⅵ. Quiz
Double threshold determination: When temperature > 30℃ or humidity > 70%, XGO
Shake; Otherwise, theslide bodywill “breathe” slightly.Format output: Use the
jointo string"T:" + fb temperature + " H:" + fb humiditytogether and then scroll to display it.Add a buzzer:
play tone 440 Hz 500 mswhen the threshold is reached to make the reminder more obvious.
Ⅶ. FAQ
Questions |
Possible causes |
Solutions |
|---|---|---|
Temperature |
Sampling is too fast |
|
No scrolling content on LED |
Spelling mistake |
Confirm that the |
Actions never stop |
The threshold judgment lacks “fallback” |
After triggering, |
There is a conflict |
Both temperature and humidity |
Set priorities or cooldown |



