This guide is part of a series of guides that cover the basics of using Adafruit IO WipperSnapper. It will show you how to send push-button data to Adafruit IO, without writing a single line of code.

WipperSnapper is an interface for Adafruit IO, Adafruit's incredibly easy-to-use IoT platform, designed to turn any WiFi-capable board into an IoT device without programming a single line of code. 

Simply load the WipperSnapper firmware onto your board, add credentials, and plug it into power. Your board will automatically register itself with your Adafruit IO account.

From there, you can add components to your board such as buttons, switches, potentiometers, sensors, and more! Components are dynamically added to hardware without the need for re-programming your board.

Parts

Aww yeah, it's the Feather you have been waiting for! The HUZZAH32 is our ESP32-based Feather, made with the official WROOM32 module. We packed everything you love...
$19.95
In Stock
As technology changes and adapts, so does Adafruit. This  USB Type A to Type C cable will help you with the transition to USB C, even if you're still...
$4.95
In Stock
Little clicky switches are standard input "buttons" on electronic projects. These work best in a PCB but
$2.50
In Stock
ΩMG! You're not going to be able to resist these handy resistor packs! Well, axially, they do all of the resisting for you!This is a 25 Pack of 10K...
$0.75
In Stock
This is a cute half-size breadboard, good for small projects. It's 2.2" x 3.4" (5.5 cm x 8.5 cm) with a standard double-strip in the middle and two power rails on both...
$5.00
In Stock
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...
$4.95
In Stock
WipperSnapper is BETA software

WipperSnapper is in beta and actively being developed to add functionality, hardware, and fix bugs.

We encourage you to try out WipperSnapper with the understanding that it is not final release software and is still in development.

If you encounter any bugs, glitches, or difficulties during the beta period, or in this guide, please file an issue on the Adafruit IO support page.

Sign up for Adafruit.IO

Adafruit IO is a platform designed by Adafruit to displayrespond, and interact with your project's data. You will need an Adafruit IO account to use the Adafruit.io Wippersnapper platform.

If you do not already have an Adafruit IO account set up, head over to io.adafruit.com to link your Adafruit.com account to Adafruit IO.

Install ESP32 USB Driver

First, install the SiLabs CP2104 Driver on your computer. This driver is required for your computer to communicate with the ESP32.

Enable Web Serial

We've developed a web-based tool for you to install WipperSnapper on your ESP32. This tool uses the Web Serial functionality of Google Chrome.

You will have to use the Google Chrome browser for this to work.

Safari, Firefox, and other browsers are not supported at this time because this tool requires Web Serial and only Chrome is supporting it to the level needed at present.

At this step, you'll need to enable the Serial API, which is really easy.

Visit chrome://flags from within Chrome. Find and enable the Experimental Web Platform features

Restart Chrome

Install WipperSnapper on ESP32

In the Chrome browser, visit the WipperSnapper NVM Tool website.

On the top right of the webpage, click the Connect button. You will get a pop-up with a list of USB devices. Select the USB port belonging to your ESP32.

You may want to remove all other USB devices so only the ESP32 board is attached, that way there's no confusion over multiple ports! 

The Javascript code will now try to connect to the ROM bootloader. It may timeout for a bit until it succeeds. On success, you will see that it is Connected and will print out a unique MAC address identifying the board.

Once you have successfully connected to the ESP32, a form will appear with a spot to enter your credentials.

To obtain your Adafruit IO credentials, navigate to the Adafruit IO WipperSnapper page and click "My Key". A modal will pop up with your Adafruit IO username and the active key.

Your network credentials are not saved to a server, this script is run locally on your browser.

Navigate back to the WipperSnapper ESP32 installation page and enter your network and Adafruit IO credentials.

Click Install WipperSnapper.

You should see WipperSnapper being flashed to your ESP32. Hang tight and stay on this tab, the process takes a little over a minute. Do not disconnect your ESP32 from USB until the installation has been completed.

Once the tool completes the installation, the top form will collapse and you'll see a message in the log indicating that the operation is complete.

Navigate to https://io.adafruit.com/wippersnapper and press the RESET button on your ESP32.

You should see a new modal pop-up with a picture of your ESP32! Give it a name and click Continue.

Congrats, your board is registered with WipperSnapper! The LED(s) or NeoPixel(s) will periodically flash to alert you that the board is still connected to Adafruit.io WipperSnapper.

Next, let's add some components to your board and start playing around! 

There are two different ways to wire this project. The first way uses a physical pull-down resistor, and the second one uses a built-in pull-down resistor.

Physical pull-down wiring

Connect the following wires:

  • Feather GND to a 10K resistor to the bottom left side of button
    • The resistor is not polarized, so it can be connected in either direction.
  • Feather 3V to the bottom right side of button
  • Feather Pin 14  to the  upper left side of button

What is a pull-down resistor?

The resistor being used in this project is really important. It's used to pull the input pin, #14 down. This makes it so that the button doesn't appear to open and close a bunch when it isn't pressed. If you were to switch the red and black wire, it would be pulled up, which would make it show up as 0 when pressed and 1 when not pressed, as opposed to a pull-down which is 0 when not pressed and 1 when pressed.

Resistors used to pull should not be too low, which would short the circuit and always show True, or too high, which would be effectively the same as no resistor at all. Generally, resistance values between 1K and 100K are used, but nominally just use 10K.

Feel free to play around with this yourself once you've set it up with WipperSnapper. If you disconnect the GND wire completely, you'll notice that the state of the button switches back and forth really fast and you get rate limited quickly. Also try switching the red and black wires so that the red one is connected to the resistor and the black one is connected to the lower right pin of the switch. You should see it show up as closed when it's open and open when it's closed.

Built-in pull-down wiring

Connect the following wires:

  • Feather GND to one side of the button
  • Feather Pin 14 to the other side of the button

Now that you've wired everything up and added your board to WipperSnapper, it's time to set up the button itself.

Log into Adafruit.io.

From the device page, click + New Component.

Make sure that your device says that it is online next to the name of the board. If it isn't but it was previously connected, try moving it closer to your router.

Then, click on Push Button.

Name it whatever you want. I chose to call it button, but anything else should work as well.

Set Push Button Pin to D14.

Finally, make sure that Return Interval is set to On Change.

If you are using an internal pull-up, check the box labeled Specify Pin Pull Direction? and select the box labeled Pull Up. If you are using a physical pull-down resistor, you don't need to do this.

Project usage

Now, as you push the button, you should see the text in the grey sensor box go from "Unpressed" to "Pressed."

This guide was first published on Sep 30, 2021. It was last updated on 2021-09-30 19:08:33 -0400.