Hi,
I have purchased the cloud, and now I do not know how to connect my device to the new server cloud. I’m using NodeMCU ESP8266, and this below is my code:
#define THINGER_SERVER "myserver.aws.thinger.io"
#include <ESP8266WiFi.h>
#include <ThingerESP8266.h>
#define USERNAME "myusername"
#define DEVICE_ID "device_1" // nama device
#define DEVICE_CREDENTIAL "credentials1"
ThingerESP8266 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
const char* ssid = "myssid";
const char* password = "mypassword";
void setup() {
Serial.begin(115200);
thing.add_wifi(ssid, password);
thing["dataSensor"] >> [](pson & out)
{
out["temperatur air"] = temperatur;
out["turbiditas"] = turbidity;
out["oksigen"] = oksigen;
out["ph"] = phmeter;
};
}
void loop() {
thing.handle();
}
The code is well compiled on Arduino IDE, the WiFi’s connection is good, but the device won’t connect on the cloud server.
Is there something that I missed?