Once your LED is wired up and connect to your Raspberry Pi, you can add it to the Cayenne Dashboard. Let’s add a Light Switch to control our light.
1. Using the mobile app, tap the + icon to go to the Add Device screen.
2. On the Add Device screen you will see categories containing various sensors and devices that can be added. The switch that we want to add is located in the Actuators Tap on the Actuators tile to continue.
3. Within the Actuators category, you’ll see a list of models for devices that can be added. Since we want to add a light switch, locate the Light tile and tap on it to continue.
4. From the list of Light devices that appears, find and tap on the Light Switch.
5. In order to add our new light switch widget to the dashboard, we will need to fill in a few details first.
Name: Enter “Light Switch” for the name of our new widget.
Icon: Select the Light icon from the list of icons.
GPIO: Our LED is connected directly to the Raspberry Pi, so make sure the Integrated GPIO is selected in the GPIO list.
Channel: When setting up our LED we wired the light to GPIO 17. Select 17 in the list of channels
Invert Logic: We want the light to start off and then turn on as we tap the button, so make sure that the Invert Logic is set to No.
6. Tap Add Switch to complete adding your switch. You will then be returned to the Dashboard where you will see your new switch added.