Mission
Build this
Build an OLED face, colour vocabulary, and posture generated from a written temperature rule that can grow to include humidity.
Borrowed parts are labelled below and have a fallback. The registered device ID is fixed; sensing and behaviour decisions remain yours.
Bill of materials
Parts
| Source | Part | Fallback |
|---|---|---|
| ● kit | OLED | — |
| ● kit | SG90 servo | — |
| ● kit | RGB LED and 220 Ω resistors ×3 | — |
Disconnect USB before rewiring. Motors, the relay, and the servo need appropriate power and a shared ground. Never drive an actuator from the ESP32 3V3 pin.
Your invitation
Translate weather without pretending to predict it
Weather Mood listens to Juliet’s live temperature and humidity, then gives the present condition a face, colour, and posture. It is an interpreter of what the greenhouse reports now—not a forecast of what will happen next.
The difficult work happens before animation. Your team must decide which combinations deserve different moods, what happens at their borders, and how the creature admits that its data has gone quiet.
Two teams may classify the same 24 °C differently. Both can be defensible if their rules are visible and stable.
The central idea
A number becomes a mood only after a rule
Temperature and, when ready, humidity arrive from another device.
A written table selects one registered mood.
Face, colour, and posture tell the same story.
Keep these layers separate in code. If the team changes a temperature boundary, it should not need to redraw the face. If the face changes, the scientific rule should remain untouched.
Write the climate dictionary
Give every region a name—and every gap a home
| Temperature | Humidity | Mood | Face | Posture |
|---|---|---|---|---|
| below ___ °C | any trusted value | cold | team draws | hunched |
| ___ to ___ °C | ___ to ___ %RH | calm | team draws | open |
| above ___ °C | not extreme | warm | team draws | wilting |
| team-defined combination | team-defined | alert | team draws | distinct |
Make a complete one-input table first. Addgarden/greenhouse-1/climate-node/gm-01/humidity only after every temperature value has exactly one answer. A two-input table should clarify the story, not create unnamed corners.
Wiring
Make three outputs agree before making them charming
Show received values on the OLED first. Add one LED colour per class, then posture. The servo must move without delaying message handling or causing the display to reset.
The power rule: The OLED and RGB logic use 3V3. Each LED colour needs its own 220 Ω resistor. The servo uses a separate 5 V supply. Join all grounds.
Bench referenceOpen the exact wiring map
| ESP32 pin | Part | Part marking | Carries |
|---|---|---|---|
3V3 | OLED (SSD1306) | VCC | 3V3 power |
GND | OLED (SSD1306) | GND | Ground |
GPIO 21 | OLED (SSD1306) | SDA | I²C bus |
GPIO 22 | OLED (SSD1306) | SCL | I²C bus |
GPIO 25 | RGB LED | R via 220 Ω | Digital in/out — common-cathode LED; invert logic for common-anode |
GPIO 26 | RGB LED | G via 220 Ω | Digital in/out |
GPIO 27 | RGB LED | B via 220 Ω | Digital in/out |
GND | RGB LED | common cathode | Ground |
GPIO 18 | SG90 servo | signal (orange) | PWM to actuator — climate posture |
external 5 V | SG90 servo | power (red) | 5V power — separate supply |
GND | SG90 servo | ground (brown) | Ground — join servo and ESP32 grounds |
Never power the servo from ESP32 3V3. Disconnect USB before rewiring and keep the servo power leads away from the OLED bus.
- 3V3 power
- Ground
- I²C bus
- Digital in/out
- PWM to actuator
- 5V power
The map assumes a common-cathode RGB LED. If your LED is common-anode, connect the common pin to 3V3 and invert the colour logic.
The creature lives at the boundaries
Do not let one uncertain decimal cause a mood swing
Suppose warm begins at 25 °C. Readings of 24.9, 25.1, 24.8, and 25.2 could make a nervous creature flip four times. Give entering warm and leaving warm different conditions, or require the new class to persist. This small memory is called hysteresis.
Your team decides:
- Which classes are useful rather than merely numerous?
- How wide is each memory band?
- How long may data remain silent before it becomes stale?
- What neutral face and posture mean “I do not currently know”?
Your replay theatre
Test every border before inviting live weather in
- Freeze the first rule table.
Write every class, boundary, and output before coding the classifier.
- Replay values below, on, and above each boundary.
Include slow approaches from both directions and missing humidity.
- Add realistic noise.
Alternate nearby values and count unwanted mood changes before and after adding memory.
- Switch to live topics.
Confirm that the displayed numbers, selected mood, and physical expression remain traceable to the same message.
| Replay values | Expected mood | Observed mood | Changes | Reason |
|---|---|---|---|---|
| boundary − 0.2 | ___ | ___ | ___ | ___ |
| boundary ± 0.2 alternating | stable | ___ | ___ | ___ |
| no new message | unknown / warning | ___ | ___ | ___ |
When the face disagrees with the garden
Trace the story backwards, one layer at a time
The displayed value changes but the pose does not
Inspect the classifier result before touching the servo. The current value may still belong to the same class or the new state may be waiting through persistence.
The creature changes mood every minute
Replay the same values. If they sit around a boundary, add a memory band rather than smoothing away all real change.
Humidity creates impossible combinations
The two-input table has a gap or overlap. Draw the regions as a grid and make every cell choose exactly one mood.
The garden goes quiet but the face stays confident
Store the arrival time of the last valid message. After the documented limit, publish a warning status and show the unknown expression.
The servo resets the screen
The actuator is disturbing power. Use its separate supply, share ground, and update posture only when the class changes.
Choose your interpretation study
What kind of mood team will you become?
The climate cartographers
Make the two-variable rule map the centrepiece. Explain every region, overlap, and unknown edge.
The boundary tamers
Compare persistence and hysteresis using the same noisy replay, then defend the calmest honest response.
The expression translators
Test whether unfamiliar viewers match faces, colours, and postures to the intended conditions without seeing the rule names.
A calm way through the build
Collect four small wins
wm-01says hello.Join the garden with a neutral expression.
- One live temperature appears with its age.
Separate message receipt from interpretation.
- The complete rule table survives a replay.
Test borders and stale data before animation.
- Face, colour, and posture tell one story.
Add non-blocking outputs, then introduce humidity if it earns its place.
The garden handshake
Share what you found
These names are the rigid part of the project. They let another team find your work without knowing what you called the variables in your code.
Current climate mood
garden/visitor-centre/ladybug/wm-01/moodUnit: enum
Device confidence state
garden/visitor-centre/ladybug/wm-01/statusUnit: enum
Listen beyond your own device.
garden/greenhouse-1/climate-node/gm-01/temperatureTemperature is the required input. Once the one-variable classifier is complete, use the multiple-subscription helper to add the matching humidity topic and document the expanded table.
Finish line
Ready to introduce to the garden
wm-01 stays online and publishes registered mood and status values.
The reject feed stays clear after the final code starts.
The device reads Juliet temperature and, if used, its matching humidity topic with message-age checks.
OLED face, RGB colour, and servo posture express one class without blocking garden messages.
The build log contains the rule table, every boundary replayed from both directions, a noisy-boundary comparison, stale-data behaviour, and one known interpretive limit.
The servo is safely powered, LED channels are current-limited, and the device label can be scanned.
Weather Mood is not correct because its face looks convincing. It is trustworthy because every expression can be followed backwards through a visible rule to fresh shared evidence.