Arduino and Raspberry Together


Thank you for responding. I had already downloaded the library, but what I found the issue to be was that I needed to be more specific with the cd command in the terminal. The library was tucked away in subfolders within my downloads and until I entered cd Downloads/Cayenne-Arduino-Library-master/extras/scripts I could execute the file. I also needed to change the mode to grant permission to execute by typing in the chmod +x command first. I am hoping to add more arduinos to automate a hydroponics farm we have built in our school building. Thanks again.


I was checking out your code for the DHT integration from your Arduino through your RPi3. Did you have to use two different virtual pins in order to get the temperature AND humidity (V0) and (V1) to show up on the dashboard? I saw that you defined virtualPin V1 at the top, but later referred to V0 in your humidity instructions. Any insight would be helpful…thanks!


Just want to say thank you for sharing your solution about running chmod +x on the script before it can be run on a Mac. I ran into the same thing a few months back and we have a bug open internally to update the comments at the top of the sketch to include this instruction. Hopefully we’ll get it updated soon so other users don’t run into this trouble.


When I implemented this, it takes like 2 days to find this command and run it :slight_smile:


When I tried to reconnect my arduino uno via my rpi3 USB port today, I noticed that the dashboard would recognize it for a moment, and then lose connection. This was the first time I tried connecting while I had sensors and LEDs attached to the arduino’s digital pins (DHT11 and DS18b20). When trying to add custom widgets to read the sensors via virtual pins, I was not able to make a connection. The Pi is connected via Ethernet using a static IP address that I have assigned. The rpi3 is being read as usual by the dashboard. Do you have any insight as to what might be causing the loss of contact between the arduino and cayenne? If there is more info you need on my end I am happy to share it…thanks a bunch!


Is the pi resetting when it loses connection? Power supplies have been an issue in the past for similar problems. If not we can troubleshoot some network settings. Have a run through this post as well Troubleshooting Pi Showing Up as Offline in Dashboard


The Pi itself is not having connection issues. It is being recognized and read. The Arduino Uno that is using the Pi for Cayenne access is the one having trouble communicating via serial-USB port. I took it home this weekend to trouble shoot and found that when on my home wifi network there is no issue. Can you recommend what I should look into?

On a side note, after about 20 minutes of good, fluid readings while connected at home, the widgets for my Arduino froze. It was still being recognized by Cayenne, but was no longer updating the values assigned to the sensors.


Hello newbie here who is trying to install a dht22 to monitor humidity … I was wondering with this method would I be able to view both the raspberry pi and arduino on the same caynee dash board ? Also is the dht sensor visable in the iOS app ?


Sorry to bother Total newbie at it again , here is the error i am getting while trying to add the sketch to my arduino

Here are the error messages i have adeed the cayenne libary per instructions is there anything else and updated with my token.

Arduino: 1.8.3 (Windows 10), Board: “Arduino/Genuino Uno”

C:\Users\le93060\Documents\Arduino\sketch_aug16a\sketch_aug16a.ino:1:27: fatal error: CayenneSerial.n: No such file or directory

#include <CayenneSerial.n>


compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Hello mate,
In the first line you have #include <CayenneSerial.n> and it should be #include <CayenneSerial.h>

Regards :wink:


Yes, it is possible.
You can add as much devices as you want on the same dashboard. First ensure that they are connected to the Cayenne and sensors are sending data as you expect. Then you can create a new project and drag and drop devices and sensors that you want to display. This is indeed a cool function! See the picture bellow, for creating a new project:


@joaoduarte_89 @ognqn.chikov Thank you Very much it took the sketch when I copied exactly what @akers.kenneth66 posted and changed my key. I installed the cayenne library, but how and where do I place the code for this? Also, how do I run the command on the PI for" , do I use sudo apt git ? I am very new to this and have only been able to Succfussly add a relay and one wire temp sensor. My goal is to get my relays and ds18b20 working as well as my DHT22 all on one cayenne dash board exactly like @ognqn.chikov . I purchased my Arduino to help with this project since i did not want to use the mattq feature. I am sorry for so many questions.


You can read this comment, and follow the same procedure:


I am working of that post but do not understand how to run the script . I have included a snap shot of my directory for you and also the error I am getting while trying to run the script … I am positive i am doing something wrong and help is greatly appreciated


Looks like you don’t have the script to run it. You can download it from here


Thank you Adam , would I use git clone and then the URL ?


Yes, that will work. Or you can right click it and save link as if you want to do it from a browser.


Thank you adam i am trying to do this with putty . Buti got the following error


Try to manually copy it. I was also trying with github but with no success. I used a VNC and make a copy/paste via the graphic user interface.


Try this command: