Skip to content
MakerBuddy

Week 6 · Term 1 · 45 to 60 minutes

Digital Inputs: The Push Button

Make a button do something

Try it first, no kit needed

Learning Objective

Use the embedded push button as a digital input and observe how a physical action becomes information on the dashboard.

Digital Inputs: The Push Button

Week 6 Term 1 45–60 minutes
The on-board push button (GPIO 5) highlighted on the green MakerBuddy IoT Kit V1.0 boardThe on-board push button (GPIO 5) highlighted on the green MakerBuddy IoT Kit V1.0 board

Hardware: embedded push button

The Push Button card in the MakerBuddy web app, browser extension and mobile appThe Push Button card in the MakerBuddy web app, browser extension and mobile app

Dashboard: Push Button sensor card
Shows Pressed or Released.

See How the Push Button Works

Read the picture from left to right: the change in the world → the sensor signal → a useful action.

Diagram showing an open and closed push-button circuit, two digital states, and uses in an elevator, help button and reaction game

1 · What it notices

A person pressing or releasing it.

2 · How it works

Pressing closes a tiny circuit and releasing opens it, giving two digital states.

3 · Why it matters

It lets a person give a machine a clear command.

Where might we use it?

  • Elevator and door controls
  • Help and stop buttons
  • Games and control panels

Student sentence: A push button turns a press into one of two states: pressed or released.

Teacher/parent prompt: Ask, “What changes on the left, what does the sensor turn it into, and what could happen next?”

From Press to Data

The push button is built into your MakerBuddy IoT Board, so no wiring is needed. It has two useful states: pressed and released. The board checks it once every second, and the dashboard gets a new reading about every 2 seconds. So hold the button for about 3 seconds to be sure the Push Button card shows it. A doorbell or game controller reacts much faster; the dashboard is made for watching, not for timing.

Inside the ESP32, pin 5 is joined to 3.3 V through a resistor called a pull-up, so the pin reads HIGH while the button is released. Pressing the button connects pin 5 to GND (0 V) and pulls the pin LOW. MakerBuddy flips this for you, so the card says Pressed when the pin is LOW. Without the pull-up, the pin would be ‘floating’ and its reading would wander.

Later, the Rule Engine can use the button as a condition. For now, just check that it works every time.

Important: never hold this button for more than 10 seconds. That erases the saved Wi-Fi name and password and restarts the board in setup mode (MakerBuddy_XXXX), so you would have to redo the Week 3 setup. Holds of 2 to 5 seconds are fine. Also keep your fingers off the button for the first few seconds after you plug the board in, while it starts up (a plugged-in LCD shows Hold button for WiFi reset...).

Try It: Catch the Button Press

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: Button State Detective

  1. Power on MakerBuddy and connect the dashboard.
  2. Find the Push Button sensor card.
  3. Press and hold the button for about 3 seconds, then let go. The card changes to ✋ Pressed and back to 👆 Released (in the browser extension: Pressed / Released). It can take up to 2 seconds to change.
  4. Try a quick tap, a one-second hold and several fast taps. Predict first, then describe what the dashboard shows. Why are some presses missed? (Hint: the board only looks at the button once a second, and the dashboard hears from it about every 2 seconds.)
  5. With a partner, one watches the dashboard while the other presses. Then swap.

Challenge: Build a Reaction Test Plan

Plan a reaction game on paper. When a light turns on, the player presses the button as fast as they can. List the input, the output and the order of events. You will use this input-to-output thinking in the Rule Engine later.

Key Takeaways

✓ Digital input

A button gives MakerBuddy a clear pressed or released signal from the real world.

✓ Embedded component

The button is built into the MakerBuddy IoT Board, so there are no wires to connect.

Learning Support

Use this quick guide to help every learner understand, practice and explain Digital Inputs: The Push Button.

For students

Try it in three steps

  1. Say it: explain the main idea in one simple sentence.
  2. Show it: Hold the onboard push button for about 3 seconds and watch the Push Button card change between Pressed and Released.
  3. Stretch it: Plan a reaction game on paper: list the input, the output and the order of events.

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: Press the push button with a fingertip and never hold it for more than 10 seconds: that erases the board's Wi-Fi settings.

Did you get it?

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

  1. 1What are the two useful states of the push button?

  2. 2Why does the dashboard sometimes miss a quick tap on the button?

  3. 3What happens if you hold the button for more than 10 seconds?