Hello,
I am essential a novice when using myDevices-Cayenne with ESP8266 boards. The following script was uploaded successfully according to Arduino IDE. The response from myDevices is “Waiting for board to connect”. Please help!
Thank You!
John
#include <CayenneMQTTESP8266.h>
#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
char ssid = “XXXXXXX”;
char password= “XXXXXXXX”;
char username = “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”;
char mqtt_password = “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”;
char client_id = “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”;
void setup() {
// put your setup code here, to run once:
Cayenne.begin(username, mqtt_password, client_id, ssid, password);
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
Cayenne.loop();
}
CAYENNE_IN(0)
{
digitalWrite(2, !getValue.asInt());
}