In this demo, we show reading the state of a push-button from WipperSnapper. But the same kind of control can be used for reading switches, break beam sensors, and other digital sensors.

You can configure a board running WipperSnapper to read data from standard input buttons, switches, or digital sensors, and send the value to Adafruit IO.

From Adafruit IO, you will configure one of the pushbuttons on your board as a push button component. Then, when the button is pressed (or released), a value will be published to Adafruit IO.


The following parts are required to complete this page.

Angled shot of 10 12mm square tactile switch buttons.
Medium-sized clicky momentary switches are standard input "buttons" on electronic projects. These work best in a PCB but
In Stock
Angled shot of half-size solderless breadboard with red and black power lines.
This is a cute, half-size breadboard with 400 tie points, good for small projects. It's 3.25" x 2.2" / 8.3cm x 5.5cm with a standard double-strip in the...
In Stock
Bundle of multi-colored multi-length wire jumpers
75 flexible stranded core wires with stiff ends molded on in red, orange, yellow, green, blue, brown, black and white. These are a major improvement over the "box of bent...
In Stock


  • Feather GND to Push Button
  • Feather GPIO 13 to Push Button

Note - we are not using a resistor part! We will be configuring the Feather ESP32 to use its internal resistor instead.

Create a Push-button Component on Adafruit IO

On the device page, click the New Component (or "+") button to open the component picker.

Search for the component name by entering push into the text box on the component picker, the list of components should update as soon as you stop typing.

Filtering and searching for components

WipperSnapper supports such a large number of components we added filtering!
Try searching for various keywords, like:

  • component names: aht20servobuzzerbutton, relay, etc
  • sensor types: lighttemperaturepressurehumidity, etc
  • interface: i2cuartds18x20pin, etc (also I2C addresses e.g. 0x44)
  • vendor: AdafruitASAIRInfineonBosch, Honeywell, Sensirion, etc

We’ve also added product and documentation links to every component, follow the links beneath the component descriptions to be taken to the appropriate product page or Learn-Guide.

Select the Push Button from the list of results to go to the component configuration page.

There will be a back button if you select the wrong component, and you can use the Edit component icon (⚙️) on the device page to update the component configuration in the future.

The "Create Push Button Component" form presents you with options for configuring the push button.

Start by selecting the board's pin connected to the push button.

The Return Interval dictates how frequently the value of the push-button will be sent from the board to Adafruit IO.

For this example, you will configure the push button value to be only sent when the value changes (i.e.: when it's either pressed or depressed).

Check the Specify Pin Pull Direction checkbox.

Select Pull Up to turn on the internal pull-up resistor.

Make sure the form settings look like the following screenshot. Then, click Create Component.

Adafruit IO sends a command to your WipperSnapper board, telling it to configure the GPIO pin you selected to behave as a digital input pin and to enable it to pull up the internal resistor.

Your board page should also show the new push-button component.

Push the button on your board to change the value of the push-button component on Adafruit IO.

This guide was first published on Nov 25, 2015. It was last updated on Apr 23, 2024.

This page (Read a Push-button) was last updated on Mar 08, 2024.

Text editor powered by tinymce.