Skip to content
MakerBuddy

Week 25 · Term 4 · 45 to 60 minutes

Time-Based Automation

Automation using timers

Try it first, no kit needed

Time-Based Automation

Week 25 Term 4 45-60 minutes

Learning Objective

Open Term 4 by learning the Timer mode. Schedule a rule to repeat at a chosen interval, and understand the difference between a step delay and a loop interval.

Theory: Controlling Time

What We Know So Far

In Term 3 your MakerBuddy did things once (No Loop) or constantly (Forever). Most real automation sits in between.

A smart farm cannot water its plants just once, or they die. It cannot water them constantly, or they drown. It needs a schedule: a burst of water, a long wait, then another burst.

That is what Timer mode does.

How Timer Mode Works

A Timer rule runs all its steps, then parks (sits idle) and waits for the interval you chose. Then it runs the whole sequence again from step 1, again and again.

▶️   Run all steps → wait the interval → Run all steps → wait the interval → …
Important detail: the interval countdown starts after the last step finishes. So a 3-step rule that takes 2 seconds, with a 10 second interval, repeats every 12 seconds.

Setting the Interval

Choose the ⏱️ Timer loop mode and a panel with three boxes appears:

🕐
Hours

0 to 999

⏳
Minutes

0 to 59

⏱️
Seconds

0 to 59

The boxes are added together into one interval. So 0 h : 1 m : 30 s means "wait one and a half minutes". The form starts at 5 minutes, so check the boxes before you save.

Rule Engine Timer Mode interval settings

The Timer panel — set the interval using the Hours, Minutes and Seconds boxes.

Delay vs. Interval — Don't Mix Them Up

This is the trickiest idea today. A Timer rule has two kinds of waiting:

Step DelayLoop Interval
Where you set itInside each stepIn the Timer panel at the top
UnitsMilliseconds: any whole number from 0 to 3,600,000 (one hour). Keep it at 100 or more so you can see each step.Hours, minutes and seconds
What it controlsThe gap between steps — how long an action lastsThe gap between whole runs — how often the rule repeats
ExampleBuzzer On, delay 200 → a 0.2 second chirpInterval 0:00:30 → chirp again in 30 seconds

In short: delays shape the action, the interval shapes the schedule.

Timer Beats Forever

In the priority order, Timer sits above Forever:

🎯 Condition  >  ⏱️ Timer  >  ♾️ Forever  >  ⏹️ No Loop

A parked Timer rule is not using its components, so it lets go of them. A lower-priority Forever rule can control the LED in the gap. The Timer rule takes it back just when it needs it.

Only rules can share this way. A Forever step that comes due during the Timer's flash is skipped, not delayed. On the dashboard, the LED Control card stays locked for as long as the Timer rule is running. The rule list says ▶️ Running even while it waits.

For Teachers

Drill delay vs. interval. Ask which one students would change to make a beep longer, and which to make it more frequent.

Real-World Applications

🌱
Irrigation Systems

Water a field for 10 minutes every 12 hours, all summer, with nobody there.

📊
Data Logging

Weather stations save a reading every 15 minutes. That shows the trend and saves power.

🔔
Reminders & Bells

School bells and medicine alerts repeat on a set interval.

These jobs aren't urgent. Doing them non-stop would waste water, power or patience.

Try It: Schedule a Timer Rule

Interactive demo · no kit needed

Play with a pretend MakerBuddy board and its web page, right here.

Follow the steps one at a time. Got the kit? You can switch to the real board inside.

Activity: The Slow Blinker

Build a hazard light that flashes briefly, then rests, like a roadworks beacon saving its battery.

Step-by-Step Instructions:

  1. Open the Rule Engine and add a new rule named HazardLight.
  2. Loop Mode: choose ⏱️ Timer. The interval panel appears.
  3. Set the interval: Hours → 0, Minutes → 0, Seconds → 10.
  4. Step 1: Action → LED On, Value → 255, Delay → 1000.
  5. Add Step 2: Action → LED Off, Delay → 100.
  6. Save and watch carefully with a clock.

What you should see: the LED turns on at once, stays on for 1 second, then switches off. It stays off for about 10 seconds (10.1 s: the Off step's 100 ms, then the 10 s interval), so a new flash starts every 11.1 seconds. The delay made the flash long; the interval made flashes rare.

Now Experiment:

  1. Press ✏️ (Edit Rule) on the HazardLight row. Change Step 1's Delay (ms) to 3000 and press ✏️ Update Rule. Does the light flash longer or more often?
  2. Put the delay back to 1000, and change the interval to 0 : 0 : 3. Now which one changed?
  3. Set the interval to 0 : 1 : 0. Predict when the next flash will be, then check with a clock.

Troubleshooting: if Save does nothing, the browser points to the box to fix. Every step needs an Action, and every Delay must be a whole number from 0 to 3,600,000. Hours can be 0 to 999, and Minutes and Seconds 0 to 59. If the light never seems to come back, check you didn't leave the default 5 in the Minutes box.

Challenge: The Metronome & The Plant Waterer

Challenge 1: Keep the Beat

A metronome clicks a steady beat for musicians. Turn your MakerBuddy into one.

  • Create a Timer rule named Metronome. Set the interval to 0 h : 0 m : 1 s.
  • Step 1: Action → Buzzer On, Delay → 100 (a short click).
  • Step 2: Action → Buzzer Off, Delay → 100.
  • Save it and clap along with the beat. 🎵
Think: the rule takes about 0.2 s, then waits 1 s, so the real beat is roughly every 1.2 seconds. How could you get closer to one second? (Hint: the interval is not your only lever.)

Challenge 2: The Automatic Plant Waterer

Build a greenhouse watering system. The relay stands in for the pump, and a green RGB light shows when watering is happening.

  • With the USB cable unplugged, plug the relay into the connector marked 23. Connect only the kit's small fan or lamp to it. Never connect the relay to anything that plugs into a wall socket. Then plug the USB cable back in and press 🔌 Connect again.
  • Create a Timer rule named WaterPlant with an interval of 0 h : 1 m : 0 s.
  • Step 1: Action → RGB Green, Delay → 100.
  • Step 2: Action → Relay On, Delay → 2000 (the pump runs for 2 seconds).
  • Step 3: Action → Relay Off, Delay → 100.
  • Step 4: Action → RGB Off, Delay → 100.
  • Save. The green light comes on at once, and the relay clicks on 0.1 s later. It clicks off 2 seconds after that, and the whole cycle repeats about every 62 seconds (2.3 s of steps plus the 60 s interval).
Engineering question: a real greenhouse would water every 12 hours, not every minute. Write the exact Hours/Minutes/Seconds you would enter. Then discuss: what happens if it rains? Next week Condition mode fixes that.

Key Takeaways

✓ Timer runs on a schedule

All steps run, then the rule waits for the interval before repeating.

✓ The interval is H : M : S

Three boxes added together, not milliseconds. The default is 5 minutes.

✓ Delay ≠ interval

Delays decide how long an action lasts; the interval decides how often it repeats.

✓ A parked rule shares nicely

While waiting, a Timer rule lets other rules use its components. Its control card on the dashboard stays locked.

Coming Up Next Week:

Week 26: Sensor-Based Control — Condition Loops — the last Loop Mode, where your MakerBuddy reacts to the real world.

Learning Support

Use this quick guide to help every learner understand, practice and explain Time-Based Automation.

For students

Try it in three steps

  1. Say it: explain the main idea in one simple sentence.
  2. Show it: Build the Slow Blinker, then experiment with changing the delay vs. the interval.
  3. Stretch it: Build a metronome with the buzzer and an automatic plant waterer that switches the relay on for 2 seconds once a minute.

Checkpoint: What was your input, what decision or process happened, and what was the output?

For teachers & parents

Coach without taking over

  • Before: ask the learner to predict what will happen and why.
  • During: use prompts such as “What changed?” and “What could you test next?” instead of giving the answer.
  • After: ask for a 30-second explanation, one piece of evidence and one improvement.

Look for: safe handling, correct vocabulary, a result the learner can demonstrate, and an explanation in their own words.

Safety reminder: Use only the kit's low-voltage fan or lamp on the relay, never mains electricity. If you build a real watering model, keep water away from the board and the USB cable.

Did you get it?

Three quick questions. Pick an answer to see whether it is right, and why.

  1. 1What does a Timer rule do after it runs all its steps?

  2. 2What is the difference between a step delay and the Timer interval?

  3. 3Why is a Timer rule a good fit for watering plants?