The use of the ESP8266 in the world of IoT

User avatar
By NY20200803
#88217 Thank you very much for contacting me.

Your ESP8266 is
https://pubsubclient.knolleary.net/api
Seeing and creating
Does it work?

I like below
There is a header file for each IC,
I have to apply each function
I thought it wouldn't move.
Is it a mistake?

To replace ESP32 with ESP8266
Things to think about


=Method=

Configurable with ESP8266
It is in "Esp32 MQTT Client.h"
Please tell me the next function.
bool Esp32MQTTClient_Init (const uint8_t * deviceConnString, bool hasDeviceTwin = false, bool traceOn = false);
And

"Bool Esp32MQTTClient_SendEvent (const char * text);"
For the following reasons
Because it is necessary.

The sketch example of ESP8266 is still in memory after compilation,
I can't compile.
And
"Azure-sdk-for-c.zip" library "
When I try to import it into the Ardino library,
Error occurs.

There are multiple Arduino library packages, so you just need to install them using the package manager. The library comes with multiple samples so you can easily see what to replace.
User avatar
By NY20200803
#88218 Thank you very much for contacting me.

Your ESP8266 is
https://pubsubclient.knolleary.net/api
Seeing and creating
Does it work?

I like below
There is a header file for each IC,
I have to apply each function
I thought it wouldn't move.
Is it a mistake?

To replace ESP32 with ESP8266
Things to think about


Method

Configurable with ESP8266
It is in "Esp32 MQTT Client.h"
Please tell me the next function.
bool Esp32MQTTClient_Init (const uint8_t * deviceConnString, bool hasDeviceTwin = false, bool traceOn = false);
And

"Bool Esp32MQTTClient_SendEvent (const char * text);"
For the following reasons
Because it is necessary.

The sketch example of ESP8266 is still in memory after compilation,
I can't compile.
And
"Azure-sdk-for-c.zip" library "
When I try to import it into the Ardino library,
Error occurs.

There are multiple Arduino library packages, so you just need to install them using the package manager. The library comes with multiple samples so you can easily see what to replace.
User avatar
By davydnorris
#88230 OK, just realised your example comes directly from the Azure IoT example and the ESP32MQTTClient is not a generic one but is the Azure specific one.

In that case I would use the AzureIoTHubMQTTClient library - it's written on top of the PubSubClient and is very simple to use - have a look at the example they include to understand how to program it
User avatar
By NY20200803
#88233 Thank you very much for contacting me.
Regarding this matter, what is the solution to the next problem?
please tell me.
Content;
Located in "AzureIoTHubMQTTClient.h"
There is no "#include <TimeLib.h>" in "NtpClientLib.h"
Clock data does not move In addition to that,
Other parts do not move.

The address of the IC is equivalent to communicating with the ESP8266 Azure
The function that writes to the pointer
I presume that it is in AzureIoTHubMQTTClient.h.
I presume that if you do not use this, you will not be able to write to AZURE.

#include <TimeLib.h> somewhere? please tell me.


"NtpClientLib.h" and "#include <TimeLib.h>"
Even if you delete it, an error will occur in other places.

Help me.
Please.