Mission
Build this
Build a servo-and-colour creature that turns recent entrance activity into peeking, alert, and hiding behaviour.
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 | SG90 servo | — |
| ● kit | RGB LED and 220 Ω resistors ×3 | — |
| ● kit | Active buzzer module | — |
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
Write a character using numbers someone else collected
The Shy Bug has no crowd sensor of its own. It listens to Gate Keeper’s running visitor count and turns that shared evidence into posture, colour, timing, and—only if it adds something—a small sound.
This is not the easy project with fewer sensors. Your instrument is an audience. The challenge is to make a personality readable without labels while keeping the garden connection alive through every cautious retreat and hopeful peek.
“Curious enough to look, cautious enough to hide, patient enough to return.”
The central idea
A rising total is not the number of people here now
Gate Keeper publishes a cumulative count. It can tell you that more passages happened, but it cannot tell you how many visitors remain in the garden. The Shy Bug should react to recent activity, not pretend the total is live occupancy.
The stored entrance total.
The new entrance total.
Three new passages in five minutes—not 145 people nearby.
Store the previous count and time. A positive difference becomes recent activity. A reset, smaller value, or long silence is a special case, not a sudden empty garden.
Give the data a nervous system
Personality lives in transitions, not poses alone
Peeking
Little recent activity. The bug slowly tests the open air.
status: okAlert
A new passage arrives. Pause, brighten, and decide whether more follow.
status: activeHiding
Several recent passages make retreat feel reasonable.
status: hidingA state is more than a servo angle. Decide how the bug enters it, how long it waits, and what evidence lets it leave. Fast hiding and slow recovery often read as shy; instant movement in both directions can look like a switch.
Wiring
Build the face before asking it to perform
Test one LED colour, then each servo pose, then the optional sound. The servo movement must be scheduled in small steps or by elapsed time so incoming garden messages are still handled.
The power rule: Each RGB colour needs its own 220 Ω resistor. The active buzzer module and LED use 3V3 logic. The servo uses a separate 5 V supply. Join all grounds.
Bench referenceOpen the exact wiring map
| ESP32 pin | Part | Part marking | Carries |
|---|---|---|---|
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 33 | Active buzzer module | SIG | Digital in/out — optional, brief and quiet |
3V3 | Active buzzer module | VCC | 3V3 power |
GND | Active buzzer module | GND | Ground |
GPIO 18 | SG90 servo | signal (orange) | PWM to actuator — peeking and hiding poses |
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. Check whether the buzzer is a three-pin module or a bare two-pin part before wiring; if its current is unknown, ask for a driver module rather than connecting it directly.
- Digital in/out
- Ground
- 3V3 power
- PWM to actuator
- 5V power
The diagram assumes a common-cathode RGB LED and a small three-pin active-buzzer module. For a common-anode LED, connect the common pin to 3V3 and invert the colour logic.
Compose the courage curve
Recent activity should fade instead of vanishing at midnight
Choose a time window or a score that slowly decays. Each new passage adds nervousness; quiet time removes it. This lets the bug remember a burst without staying frightened forever.
Your team decides:
- Does every new passage add the same amount of nervousness?
- How long does quiet take to rebuild courage?
- Can a single surprise trigger alert without causing a full retreat?
- Is sound informative, charming, or simply too much for a shared room?
Your audience experiment
Let strangers tell you which character you actually built
- Prepare three data scenes.
Replay a quiet period, one sudden passage, and a busy burst. Use the same sequence for every viewer.
- Make the bug perform without explanation.
Ask at least five unfamiliar viewers what it seems to feel and what changed.
- Record their words before teaching yours.
“Sleepy,” “angry,” and “broken” are evidence, even when you hoped for “shy.”
- Revise one expressive choice.
Change timing, posture, colour, or sound, then repeat the hardest scene with fresh viewers.
| Scene | Intended reading | Viewer’s words | Correct data change? | Confusing detail |
|---|---|---|---|---|
| quiet recovery | peeking | ___ | yes / no | ___ |
| one passage | alert | ___ | yes / no | ___ |
| busy burst | hiding | ___ | yes / no | ___ |
When the character breaks character
A strange performance may begin in the data
The bug hides forever
You may be using the lifetime total rather than recent change, or your nervousness score never decays. Log the input difference and score beside the pose.
The count suddenly becomes smaller
Gate Keeper restarted or its stored count reset. Accept the new value as a baseline; do not interpret a negative difference as impossible negative visitors.
The bug twitches between two poses
Your state boundaries are too close or the recovery rule has no memory. Give entering and leaving different conditions.
Movement makes messages disappear
A long delay is blocking the garden loop. Schedule pose steps from elapsed time and keep calling spine.loop().
Viewers understand busy, but not shy
The mapping works while the character does not. Slow the recovery, add a cautious intermediate pose, or remove a colour that suggests danger.
Choose your performance study
What kind of creature team will you become?
The character animators
Focus on anticipation, retreat, recovery, and tiny secondary motions that make the same three states feel alive.
The activity interpreters
Compare a fixed time window with a fading nervousness score and test how each handles bursts and long quiet.
The audience researchers
Make first impressions the experiment. Compare which visual cues communicate state across different viewers.
A calm way through the build
Collect four small wins
sb-01says hello.Publish a calm status before adding personality.
- The live count becomes a recent difference.
Handle unchanged, increased, reset, and stale values.
- Three poses can be played from test data.
Build the character without waiting for real visitors.
- The performance survives live messages.
Remove blocking delays, then invite the first five viewers.
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.
Readable character state
garden/visitor-centre/ladybug/sb-01/statusUnit: enum
Listen beyond your own device.
garden/entrance/counter/gk-01/countUse changes in the cumulative count to estimate recent entrance activity. This is an aggregate rhythm, not a measurement of how many people are currently near the bug.
Finish line
Ready to introduce to the garden
sb-01 stays online and publishes only registered status values such as ok, active, and hiding.
The reject feed stays clear after the final code starts.
The device reads Gate Keeper count changes and handles unchanged, reset, and stale values.
Servo, colour, and optional sound express the state while garden messages continue without blocking.
The build log contains three replayable scenes, five first-viewer interpretations, one revision, and recognition evidence before and after.
The servo is safely powered, every LED channel is current-limited, sound is restrained, and the device label can be scanned.
The Shy Bug succeeds when a stranger can read its behaviour and your team can trace every gesture back to an honest piece of shared data.