This guide page assumes that you have Wippersnapper installed, your board is Online, and you are currently looking at the boards Device Info page. If you need to locate the page, visit io.adafruit.com/devices and click on your board to be taken to the device page.
If your board is not online, then reboot it and double check the secrets.json file contains the correct values. If you need a fresh secrets file then download a new one using the Set up Secrets file step of the Web installer.
Still not online? Ideally connect a serial monitor, or use a web-based one, to view the diagnostic messages from the board. A really low supply voltage can sometimes cause the flash memory to corrupt and the device erases any saved settings (like the WiFi secrets).
From the boards device page, use the New Component button to bring up the New Component dialog.
Wippersnapper supports a wide variety of components, currently over 100 input and output devices.
To quickly find your Magnetic Contact Switch, referred to as a 'Reed Switch' in the component picker, type Magnetic
into the search bar, then select the Reed Switch component from the search results.
Now on the Create Reed Switch Component dialog, select the pin used for the switch e.g. GPIO 13
.
Now select the On Change option for Return Interval, as opposed to Periodically (on a time schedule).
Finally select the checkbox for Specify Pin Pull Direction? and then choose Pull Up from the dropdown, followed by clicking the Create Component button. The dialog should look like the image below:
Now you'll be welcomed with the new component displayed on the boards device page.
Notice the graph symbol and settings cog in the top right of the component panel, click the first to be taken to the components feed page, and the second to go to the configuration options (Edit Component dialog).
You will probably find that the Closed and Open labels for the component are the wrong way compared to the current switch state. That's no problem, use the settings cog to reconfigure the reed switch component, and update the labels and icons to your preferred options.
The reason is that the default label for 0 volts (or a Low digital signal) is "Closed" assuming a Normally Closed switch, while it's recommended to do the the opposite (a Normally Open switch) as it's the one usually stocked.
Electrically this is connecting the reed switch between ground (0 volts) and the input pin (Pin 13), and the input pin has a pull up resistor enabled raising it up to 3 volts if nothing is attached. This means the input pin will sink to 0 volts when it becomes attached to ground as the switch is closed / activated (assuming a Normally Open switch).
At this point it's worth mentioning that a devices configuration can be exported (then those exports can be imported by other users even on a different device), or use the new Magic-Config option to automatically configure any components built-in to your microcontroller board (like the built in button and LED).
You can find each of these options under the Auto Config button at the top of the device page.
Here I've exported the config for my device. Notice the icon names are actually font-awesome glyphs!
{ "exportVersion": "1.0.0", "exportedBy": "tyeth_demo", "exportedAt": "2025-05-02T17:08:03.857Z", "exportedFromDevice": { "board": "rpi-pico-w", "firmwareVersion": "1.0.0-beta.100" }, "components": [ { "name": "Reed Switch", "pinName": "D13", "type": "reed_switch", "mode": "DIGITAL", "direction": "INPUT", "period": 0, "pull": "UP", "isPin": true, "visualization": { "offLabel": "Open", "offIcon": "fa6:solid:door-open", "onLabel": "Closed", "onIcon": "fa6:regular:door-closed" } } ] }
Now that you have the contact-sensor wired up and sending data to Adafruit IO, you can move on to creating an automated reactive Action to send you a notification when the sensor is triggered.
Page last edited May 14, 2025
Text editor powered by tinymce.