This demo shows controlling an LED from Adafruit IO. The same kind of control can be used for relays, lights, motors, or solenoids.

One of the first programs you typically write to get used to embedded programming is a sketch that repeatably blinks an LED. IoT projects are wireless, so after completing this section, you'll be able to turn on (or off) the LED built into your board from anywhere in the world.

Where is the LED on my board?

The PyPortal's status LED is located next to the Micro-USB port and labeled "ACT".

Create a LED 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 LED 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

Since WipperSnapper supports such a large number of components, there is keyword filtering. Try searching for various keywords, like:

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

There are also 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 LED from the list of components.

On the Create LED Component form, the board's LED pin is pre-selected. 

Click Create Component.

Behind the scenes, Adafruit IO sends send a command to your board running WipperSnapper telling it to configure "LED Pin" as a digital output.

Your board's page on Adafruit IO shows a new LED component.

Usage

On the board page, toggle the LED component by clicking the toggle switch. This should turn your board's built-in LED on or off.

This guide was first published on Feb 26, 2019. It was last updated on Mar 29, 2024.

This page (LED Blink) was last updated on Mar 26, 2024.

Text editor powered by tinymce.