Temperature and humidity sensor Am2315

Hi friends, I have been looking for an example to make the AM2315 sensor work with a WeMos D1 board ESP8266 WIFI connection.
I can’t find anything in the community.
Some help thanks

You can use the following example AM2315_ESP8266.ino at

Thanks friend for answering, when I compile it, I get this error.


In file included from C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\examples\AM2315_ESP8266\AM2315_ESP8266.ino:49:0:

C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\src/BlynkSimpleEsp8266_WM.h: In member function 'void BlynkWifi::saveConfigData()':

C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\src/BlynkSimpleEsp8266_WM.h:438:77: error: invalid conversion from 'char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]

         file.write((char*) &Blynk8266_WM_config, sizeof(Blynk8266_WM_config));  

                                                                             ^

In file included from C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\src/BlynkSimpleEsp8266_WM.h:50:0,

                 from C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\examples\AM2315_ESP8266\AM2315_ESP8266.ino:49:

C:\Users\NEU\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/FS.h:55:12: error:   initializing argument 1 of 'virtual size_t fs::File::write(const uint8_t*, size_t)' [-fpermissive]

     size_t write(const uint8_t *buf, size_t size) override;

            ^

In file included from C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\examples\AM2315_ESP8266\AM2315_ESP8266.ino:49:0:

C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\src/BlynkSimpleEsp8266_WM.h:453:77: error: invalid conversion from 'char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]

         file.write((char*) &Blynk8266_WM_config, sizeof(Blynk8266_WM_config));

                                                                             ^

In file included from C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\src/BlynkSimpleEsp8266_WM.h:50:0,

                 from C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\examples\AM2315_ESP8266\AM2315_ESP8266.ino:49:

C:\Users\NEU\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/FS.h:55:12: error:   initializing argument 1 of 'virtual size_t fs::File::write(const uint8_t*, size_t)' [-fpermissive]

     size_t write(const uint8_t *buf, size_t size) override;

            ^

In file included from C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\examples\AM2315_ESP8266\AM2315_ESP8266.ino:49:0:

C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\src/BlynkSimpleEsp8266_WM.h: In member function 'void BlynkWifi::startConfigurationMode()':

C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\src/BlynkSimpleEsp8266_WM.h:756:29: error: no matching function for call to 'ESP8266WiFiClass::softAP(String&, String&)'

       WiFi.softAP(ssid, pass);

                             ^

C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\src/BlynkSimpleEsp8266_WM.h:756:29: note: candidate is:

In file included from C:\Users\NEU\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/ESP8266WiFi.h:35:0,

                 from C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master\examples\AM2315_ESP8266\AM2315_ESP8266.ino:29:

C:\Users\NEU\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/ESP8266WiFiAP.h:39:14: note: bool ESP8266WiFiAPClass::softAP(const char*, const char*, int, int, int)

         bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);

              ^

C:\Users\NEU\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi\src/ESP8266WiFiAP.h:39:14: note:   no known conversion for argument 1 from 'String' to 'const char*'

Se encontraron varias bibliotecas para "BlynkApiArduino.h"
Usado: C:\Users\NEU\Documents\Arduino\libraries\Blynk
Se encontraron varias bibliotecas para "ESP8266WebServer.h"
Usado: C:\Users\NEU\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WebServer
Se encontraron varias bibliotecas para "Wire.h"
Usado: C:\Users\NEU\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\Wire
Se encontraron varias bibliotecas para "Adafruit_AM2315.h"
Usado: C:\Users\NEU\Documents\Arduino\libraries\Adafruit_AM2315-master
Se encontraron varias bibliotecas para "ESP8266WiFi.h"
Usado: C:\Users\NEU\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.1\libraries\ESP8266WiFi
Se encontraron varias bibliotecas para "BlynkSimpleEsp8266_WM.h"
Usado: C:\Users\NEU\Documents\Arduino\libraries\Blynk_WM-master
exit status 1
Error compilando para la tarjeta WeMos D1 R1.```

You’re still using very old ESP8266 core 2.4.1

Please update to core 2.6.3 by going to Tools -> Board Manager, search for esp8266, then update

Thank you very much Master now if everything works right.
Where do my data go, token ssid, pass?

char auth[]     = "***";
char ssid[]     = "***";
char pass[]     = "***";

would it look like this?

char auth[]     = "my token";
char ssid[]     = "ssid";
char pass[]     = "pass";```

Just upload the firmware to the board, then follow the instructions in:

You only need to hardcode your WiFi/Blynk credentials if not using Blynk_WiFiManager by changing in the code from

#define USE_BLYNK_WM   true

to

#define USE_BLYNK_WM   false

Thanks friend with your instructions it’s all very easy
but I don’t connect with blynk, I don’t understand the ip address of the server

read%20com

I think my problem is that I have to put the address of the server blynk.
i don’t know her

already solved, it was just to put the blynk server and port.
Thank you very much for your help, it would have been impossible.
Thanks, teacher