Hello,
I'm able to connect my ESP8266 module with Arduino IoT Cloud.
And it is working fine.
Here is my code...
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
CloudLight my_LED;
const char DEVICE_LOGIN_NAME[] = "0f16dd88-377c-4e48-855a-e4836eaa2137";
const char DEVICE_KEY[] = "DV#3bHvImGaiGZ?goOTcFNhi!";
const char SSID[] = "My_WiFi";
const char PASS[] = "12345678";
WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);
void setup() {
pinMode(1, OUTPUT);
ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME);
ArduinoCloud.setSecretDeviceKey(DEVICE_KEY);
ArduinoCloud.addProperty(my_LED, READWRITE, ON_CHANGE, onMyLEDChange);
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
}
void loop() {
ArduinoCloud.update();
}
void onMyLEDChange() {
digitalWrite(1,my_LED);
}
Now, I want to connect to two different Things (Devices) of Arduino IoT Cloud with my ESP8266 module.
Is it possible to do this?
If yes, please share the example code.