Go Down

Topic: Works with ESP8266 just fine (Read 4871 times) previous topic - next topic

ah01

I have tried to call Arduino Cloud from ESP8266 (programmed via Arduino core for ESP8266) and it worked just fine :)

The only differences from provided example are in included libraries and type of WiFi client:

Code: [Select]

// Include libraries
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <MQTTClient.h>

...

// Change this from original WiFiSSLClient
WiFiClientSecure net; // SSL client to use for MQTT connection

...

// rest is same as example


Nice work with Arduino Cloud.
I'm looking forward to release with more features.

bizniz

Hi ah01. Great that your got the ESP8266 to work with Arduino Cloud.

Could you please include a full listing the working code and indicate more details on exactly what was changed in the example code and what libraries your excluded from the sample code and which new libraries you added.

Thanks
Bizniz

ballscrewbob

I second the request for more info please.
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

adelskott

To help this is my code and it's working for arduino cloud with an wemos D1

#include <ArduinoCloud.h>
#include <ArduinoCloudThing.h>
#include <ArduinoCloudThingBase.h>


#include "ESP8266WiFi.h"
#include "WiFiClientSecure.h"


const char* ssid     = "XXX";      // SSID of local network
const char* password = "XXXX";  // Password on network
WiFiClient client;
ArduinoCloudThing plantes;


WiFiClientSecure  sslClient;



 
// Arduino Cloud settings and credentials
const char userName[]   = "xxx";
const char thingName[] = "xxxx";
const char thingId[]   = "xxx";
const char thingPsw[]  = "xxx";

void setup() {
WiFi.begin(ssid, password);
 while (WiFi.status() != WL_CONNECTED) {
   delay(600);
 }

plantes.begin(thingName, userName, thingId, thingPsw, sslClient);

....
}

ballscrewbob

@ adelskott

Did you push that up using CREATE or the desktop IDE ?

If it was CREATE could you please add to your post and tell us how ?

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

tiziojoe

The OP seems to be saying they can push data into the cloud, not that they programmed the device through the Create online IDE.

However, I'm very much interested in using Create to program my NodeMCU/ESP8266 devices and would love some specifics if someone did get it working.

Go Up