Introduction: Cayenne & Raspberry Pi IoT Simple

About: I’m degree in Psychology in 2001, with a thesis in Artificial Intelligence. I’m working on Smart Object, IoT and Interactive Design. I’m developing autonomously my projects. I make autonomously programs in Ard…

Cayenne is an app for smartphones and computers that allows you to control the Raspberry Pi and soon also the Arduino through the use of an elegant graphical interface and a solid nice communication protocol.

The features are:

  • Add and remotely control sensors, motors, actuators, GPIO boards, and more
  • Customizable dashboards with drag-and-drop widgets for connection devices
  • Create triggers and threshold alerts for devices, events, and actions
  • Schedule one-time or multi-device events for easy automation
  • Quick and easy setup - connect your Pi in minutes

Step 1: Sign Up to Cayenne

Go to Cayenne site and Sign Up. After download the file and install the Cayenne system on your Raspberry Pi.

Cayenne IoT Simple

Download the app on your Smartphone or tablet by using the follows link

Cayenne on Apple Store

Cayenne on Play Store

Install on your Raspberry Pi the Raspbian system. For this step download NOOBS from Raspberripi.org: https://www.raspberrypi.org/downloads/

Copy the package on your SD, and start the Raspbian installation. For the raspbian installation I recomend to use a HDMI screen, a USB mouse and a USB keyboard.

Need a Raspberry Pi?

After this, connect your Raspberry at your LAN by cable. Then open your Cayenne app and install the library on your device. The next step.

Step 2: Download the App and Install Cayenne

Download the app on your Smartphone or tablet by using the follows link

Cayenne on Apple Store

Cayenne on Play Store

Install on your Raspberry Pi the Raspbian system. Need a Raspberry Pi?

After this, connect your Raspberry at your LAN by cable. Then open your Cayenne app and install the library on your device.

OR

Install manually Cayenne on your Raspberry Pi by using Terminal of Raspberry Pi:

wget https://cayenne.mydevices.com/dl/rpi_b8w8pn82i9.sh

sudo bash rpi_b8w8pn82i9.sh -v

Please be patient 10 minute to ultimate the installation process. After this reboot your Raspberry.

Step 3: See Your Device on Cayenne Dashboard

By using Computer you can see your device on: https://cayenne.mydevices.com/ like in photo.

By using a Smartphone you can open the app and see your devices.

You can personalize the Dashboard of Cayenne by using the widgets. The default Dashboard have CPU, Temp and RAM widget . These are the values of your Raspberry Pi. You can see the temp and the work flow of Raspberry pi. Then you can see the GPIO schedule. In the GPIO you can set every pin of GPIO of Raspberry. You can set the pin like Output or Input.

Then you can activate the pin or read the value of the pin. The two values are HIGH or LOW. This is valid for Input and Output.

Step 4: Connect a Led to Your Raspberry Pi

Now you can connect a led to GPIO port of Raspberry Pi.

Use ALWAYS a resistor in series to led. If you don't use a resistor, you can burn the led or the Raspberry Pi. See the photo and connect the led to pin number 11 or GPIO 17.

Do you need a leds or resistors, or a complete kit for Raspberry Pi?

Please pay attention with the connections.

Step 5: Switch ON the Led

Now go to the Dashboard of Cayenne, and open the GPIO schedule.

Then Select the Pin 17 and click on Input. Setup the pin like Output, and after click on LOW button. The button below Green and the word HIGH appear on it. Now your led in ON!

You can switch on the led by using your Raspberry Pi by LAN, and also by a different Network Area. This is because Cayenne use a proprietary proxy.

Do you need a breadboard for Raspberry Pi

Now you can command a switch in your home! Great! But the title of this tutorial is Raspberry Pi RGB with Cayenne. It's the time for RGB led.

Step 6: Create the Buttons on Dashboard

Now you can create new widget on Cayenne Dasboard.

Go to Cayenne Dashboard on smartphone app, and click + on right up corner of screen.

Now you can add a widget. Select Actuators device --> Select Generic --> Select Digital Output.

Fill the all the fields, and select the correct channel for RGB led.

The Blue pin in the 25

The Green pin in the 24

The Red pin in the 23


Step 7: Now Switch on the Rainbow

You can use a normal breadboard and an RGB led common cathode.

The RGB led is a led that have 3 leds inside. Why the pin are only 3? Because the 3 leds share a cathode, or anode pin. For this reason you must specify the kind of led you want.Now I use a common cathode led. See the photo. Then you can connect the pin to 220 Ohm resistors and after connect this pin to the GPIO port.

The GPIO port on Raspberry are:

The Blue pin in the 25

The Green pin in the 24

The Red pin in the 23

Do you need a RGB common cathode led

I have created an "RGB shield" for Raspberry Pi. This shield (see the photo), have a connector for the GPIO port, resistors, and a RGB led.

You can see this Instructables"Simple Python RGB Raspberry Pi Tutorial", to view the RGB shield.

On The Cayenne GPIO schedule, you can set like Output the pins number 25, 24 and the pin number 23. After this you can switch on each one of this leds, or mix these colors.

Now You Are The Rainbow !