Hello friends,
i`m having issues connecting with my ESP286612E DEV KIT to my WiFi router. It is simple sketch i want to run and control via cayenne dashboard.
The code:
#define CAYENNE_DEBUG // Uncomment to show debug messages
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "<8qghxxxxx>";
// Your network name and password.
char ssid[] = "<Zombie>";
char password[] = "<zoxxxxxxm>";
void setup()
{
// initialize digital pin 2 as an output.
pinMode(2, OUTPUT);
Serial.begin(9600);
Cayenne.begin(token, ssid, password);
}
void loop()
{
Cayenne.run();
}
// This function will be called every time a Dashboard widget writes a value to Virtual Pin 2.
CAYENNE_IN(V2)
{
CAYENNE_LOG("Got a value: %s", getValue.asStr());
int i = getValue.asInt();
if (i == 0)
{
digitalWrite(2, LOW);
}
else
{
digitalWrite(2, HIGH);
}
}
I cant get far from serial port message:
So dashboard is waiting and waiting for board to connect…
I use:
- Arduino IDE 1.6.12
- NODEMCU 1.0 (ESP 12-E module)
- ESP2866 board version 2.3.0
When “helloServer”[ESP2866WebServer] tested - it was done with no problem.
BR,
Matic