Unable to connect nodemcu for push button email alert the sample code on audrino works well and it is stating as device connected the following one:#include <ThingerESP8266.h>
#define USERNAME “vijaysiva”
#define DEVICE_ID “Thingercheck”
#define DEVICE_CREDENTIAL “tayNvnJ!pppN”
#define SSID “vijayhathway”
#define SSID_PASSWORD “vijay@1234”
ThingerESP8266 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
thing.add_wifi(SSID, SSID_PASSWORD);
// digital pin control example (i.e. turning on/off a light, a relay, configuring a parameter, etc)
thing[“led”] << digitalPin(LED_BUILTIN);
// resource output example (i.e. reading a sensor value)
thing[“millis”] >> outputValue(millis());
// more details at http://docs.thinger.io/arduino/
}
void loop() {
thing.handle();
}
but when i connect using the following code below it shows device is not connected
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <ThingerWifi.h>
ThingerWifi thing(“vijaysiva”,“PanicAlarm”,“N9_e5be-V3V8”); // thinger.io( username,device name,device credentials )
int pushPin = 14; //the digital pin to the PIR sensor’s output
int ledPin = 4;
int val = 0; //variable for reading pin status
void setup() {
pinMode(ledPin,OUTPUT); // declare LED as output
pinMode(pushPin,INPUT_PULLUP); //declare push button as input
Serial.begin(115200);
//connecting to WiFi
thing.add_wifi(“vijayhathway”,“vijay@1234”); //SSID & password for mobile hotspot
Serial.println(“entering the gates”);
}
void loop() {
val = digitalRead(pushPin);
Serial.println(val); //read input value
if (val == LOW) { //checks if the input is High (button released)
digitalWrite(ledPin, HIGH); //turn LED OFF
delay(1000);
digitalWrite(ledPin, LOW);
thing.handle();
thing.call_endpoint("email");
delay(5000);
//digitalWrite(inPin, HIGH);
} else {
digitalWrite(ledPin, LOW); //turn LED ON
}
}
I did not receive any errors please help me to connect my nodemcu to thingerio for pushbutton email alert