'Cayenne' was not declared in this scope

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();
}

What is your hardware setup?

It’s a particle photon

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.

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

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();
}

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

@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.

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.

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

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:

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.

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.

@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.

1 Like

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

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

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

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.

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

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.

2 Likes