Behavior Ideas
Behaviors are the heart of Palpable. Each one follows a simple pattern:
WHEN something happens → IF conditions are met → THEN do something
You can create behaviors in two ways:
- Tell PAL what you want in plain language (fastest)
- Use the visual builder in the app (drag and drop)
Here are some ideas to get you started. For each one, we show what to say to PAL and what the behavior does.
Temperature alert
What it does: Sends you a phone notification when the temperature gets too high.
Tell PAL:
"When the temperature goes above 30 degrees, send me a notification."
How it works:
| WHEN | Temperature sensor reads above 30°C |
| THEN | Send a push notification to your phone |
| Cooldown | 5 minutes (so you don't get spammed while it stays hot) |
Modules needed: Modulino Thermo or BME280
Motion-activated lights
What it does: Turns on colored LEDs when something gets close, then turns them off after 10 seconds.
Tell PAL:
"When something gets within 50 cm of the distance sensor, turn the pixels warm white for 10 seconds."
How it works:
| WHEN | Distance sensor reads below 500 mm |
| THEN | Set all pixels to warm white → wait 10 seconds → turn pixels off |
| Cooldown | 10 minutes (prevents constant re-triggering while someone is nearby) |
Modules needed: Modulino Distance + Modulino Pixels
Button plays a sound
What it does: Press a button, hear a beep. Simple and satisfying.
Tell PAL:
"When I press button A, play a short beep."
How it works:
| WHEN | Button A is pressed |
| THEN | Play a 440 Hz tone for 200 milliseconds |
| Cooldown | 0.5 seconds (keeps it responsive for rapid presses) |
Modules needed: Modulino Buttons + Modulino Buzzer
The Modulino Buttons module has 3 buttons (A, B, C). You can create different behaviors for each one -- different sounds, different actions, whatever you want.
Knob controls a value
What it does: Turn the rotary knob to change a variable. Useful for controlling brightness, servo angles, speed, or any adjustable parameter.
Tell PAL:
"When I turn the knob, set a variable called 'angle' that maps from 0 to 180."
How it works:
| WHEN | Knob encoder value changes |
| THEN | Set variable angle = knob position mapped to 0-180 range |
| Cooldown | 0.1 seconds (very responsive to match knob turning) |
Modules needed: Modulino Knob
What's mapping? The knob produces raw numbers (0, 1, 2, 3...) as you turn it. Mapping converts that range to something more useful -- like 0 to 180 for a servo angle, or 0 to 255 for LED brightness.
Scheduled notification
What it does: Sends a "Good morning" notification every weekday at 8 AM.
Tell PAL:
"Send me a 'Good morning' notification every weekday at 8 AM."
How it works:
| WHEN | Schedule: 08:00 on Monday through Friday |
| THEN | Send push notification: "Good morning! Time to start the day" |
Modules needed: None! Schedule-based behaviors don't need any sensors.
Smart watering
What it does: Checks soil moisture every morning. If the soil is dry, turns on a water pump for 60 seconds. If it's moist enough, does nothing (and logs that it skipped).
Tell PAL:
"Every morning at 7 AM, check the soil moisture. If it's below 30%, turn on the relay for 60 seconds and notify me. If it's fine, just log it."
How it works:
| WHEN | Schedule: 07:00 every day |
| THEN | Check soil moisture: |
| If below 30%: Turn on relay → wait 60 seconds → turn off relay → send notification "Watering complete" | |
| If 30% or above: Log "Soil moisture OK, skipping watering" |
Modules needed: Soil moisture sensor + Qwiic Relay (connected to a pump)
This is an example of conditional branching -- the behavior checks a condition and does different things based on the result. You can ask PAL to create these kinds of if/else behaviors just by describing what you want.
Air quality monitor
What it does: Monitors CO2 and VOC levels, sends a notification when air quality gets poor, and shows current readings on the OLED display.
Tell PAL:
"Monitor the air quality. If CO2 goes above 1000 ppm, send me a notification. Also, show the current CO2 and VOC readings on my display."
Modules needed: SCD41 (CO2) + SGP40 (VOC) + SSD1306 OLED display
Tips for building behaviors
Cooldown prevents spam
Every behavior has a cooldown -- a waiting period after it triggers before it can trigger again. Without cooldown, a temperature alert at 30°C would buzz your phone every few seconds while the temperature stays above 30°C.
- For notifications: 5-10 minutes is usually good
- For button presses: 0.5 seconds keeps it snappy
- For display updates: 0.1 seconds for smooth real-time updates
- Default cooldown is 0.5 seconds if you don't specify one
Variables let behaviors remember things
Use variables to store values between behavior runs. For example, a counter that increments each time a button is pressed, or a mode flag that toggles between "day" and "night."
Behaviors run locally
Once a behavior is created, it runs directly on your Pi -- even if the internet goes down. Your automations keep working without cloud connectivity.
Behaviors can call other behaviors
You can create a behavior that triggers another behavior. This is useful for building complex automations from simple building blocks. PAL can set this up for you.
Dynamic text
Notification messages and log entries can include live sensor values. Just describe what you want to PAL:
"Send a notification that says 'Temperature is currently X degrees'"
PAL will set up the dynamic template for you.