'Cayenne' was not declared in this scope


#1

Hi guys, I got this error “‘Cayenne’ was not declared in this scope” can help me? Here the code:

#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space

// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = “token”;
// Your network name and password.
char ssid[] = “ssid”;
char password[] = “password”;

void setup()
{
Serial.begin(9600);
Cayenne.begin(token, ssid, password);
}

void loop()
{
Cayenne.run();
}


#2

What is your hardware setup?


#3

It’s a particle photon


#4

I don’t believe that is technically supported yet but you should be able to get it to work a couple ways. Check out this tutorial :

The other way is to use MQTT using a client. Id try the link and see if that works. Let us know if you run into more problems.


#5

Ok Thank you, I will try, and let you know if it works for me.


#6

Cayenne recognized the device, I rename it. Now, I created a widget, and doesn’t works. Here the code:

#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
// If you’re not using the Ethernet W5100 shield, change this to match your connection type. See Communications examples.
#include <CayenneEthernet.h>
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = “xxxxxx”;

void setup()
{
Serial.begin(9600);
Cayenne.begin(token);
}

void loop()
{
Cayenne.run();
}


#7

What type of widget? Are you trying to use the Digital pins or a virtual pin?


#8

@wdlarosa did your particle photon got connected to cayenne using the tutorial link provided by @vapor83??
as the code you gave above wont get particle photon to connect to cayenne.


#9

I’m trying Digital pins, and I make the setup with your tutorial. And this works a few times, but later on, it stopped, I tried to run again, but doesn’t works.


#10

Yes, the particle photon is connected to cayenne following the @vapor83 tutorial, The code is from another photon project, it works fine with IFTTT.


#11

The photon may have issues with using the digital pins directly because its technically not supported yet. I would try using virtual pins & put a conditional statement in your loop to control the LED or whatever.

Is it saying its online at least or does it show offline on the dashboard?

I can’t take credit for the tutorial… @laurencehr did a good job with it :slight_smile:


#12

You’re right, the tutorial is from @laurencehr, and the dashboard show online the photon, it works several times, more than 50 times, I was testing with different phones number with an IFTTT triggers, but it stopped, and doesn’t work any more. I tried with differents projects code, push button, send an email, send clicksms, sms, but nothing happen.


#13

Hi @vapor83, attached you can see some pics of my trigger setup. Maybe can you look up to see if everything is ok, or I have some mistake.

The led is on, when I run the trigger from the dashboard, but I would like to do is to send a SMS to my cell phone when I pushed the button.


#14

@wdlarosa
go to custom widgets add a 2 state display widget.
fill all the details and select virtual pin V2 and add this to your code.

BLYNK_READ(V2)
{
int x = digitalRead(4);
Blynk.virtualWrite(V2, x);
}
connect button pin to pin 4 of particle photon or change it to whatever you want inside the code.


@laurencehr can guide you better.


#15

Thank you @shramiksalgaonkar, I will do later today, and I will let you know about it. I wrote a message to @laurencehr, and waiting for his response.


#17

@wdlarosa have you setted another Trigger more? for check if the problem is not with SMS trigger specifically.


#18

@wdlarosa do you have this in your code?
BLYNK_READ and BLYNK_WRITE
image


#19

Hi @laurencehr, No I don’t, and I don’t have any other trigger. But got a e-mail from IFTTT, when they let me know that I reach 100 sms on my account, that’s way I don’t get more messages. I have to wait until Nov. 1st to start getting sms, I tested several times the project, that’s way I reach 100 in just a few days.
Thank you for your help, I will try another way, mail or notifications to check the project, and make the finished product.


#20

Can you set the email trigger, so you can know if the triggers are working ?
Thank you.


#21

Yes @ognqn.chikov, I setup the email trigger, and I know now why the trigger stopped, I reached the monthly sms on my account. That’s way stopped sending, I was thinking was the code, but it is fine.
Thank you.