BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

I am getting errors in temperature and humidity meter?

That’s the so called “hardware” :wink: And what about software Arduino core? Update it to newest version.

1 Like

ok thank you for help ing …
I was working normally a month ago … now I’m trying the same code again … not working

i trying uno + esp 8266 - 01

again not working I don’t understand why have such an error…

I do not see how they are able to be displayed on the serial monitor? In the posted code there are no Serial.prints() for the temp and humidity. Or the variables named NEM and Sicaklik?

NEM = huminity        
sicaklik = temperature

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "DHT.h"           // including the library of DHT11 temperature and humidity sensor
#include <SimpleTimer.h>   //including the library of SimpleTimer
#define DHTTYPE DHT22      // DHT 11

#define dht_dpin D4
DHT dht(dht_dpin, DHTTYPE); 
SimpleTimer timer;
char auth[] = "9a9b936cac33471ca52e57becd8a22b8";            // You should get Auth Token in the Blynk App.
                                           // Go to the Project Settings (nut icon).

char ssid[] = "TARIK";    // Your WiFi credentials.
char pass[] = "12345678";  // Set password to "" for open networks.
float t;                                   // Declare the variables 
float h;



void setup()
{
    Serial.begin(9600);// Debug console
    Blynk.begin(auth, ssid, pass);
    dht.begin();
    timer.setInterval(5000, sendUptime);
}

void sendUptime()
{
  
  float h = dht.readHumidity();
  float t = dht.readTemperature(); 
  Serial.println("\n");
  Serial.print("NEM = ");
  Serial.print(h);
  Serial.print("%  ");
  Serial.print("sıcaklık = ");
  Serial.print(t); 
  Blynk.virtualWrite(V2, t);
  Blynk.virtualWrite(V1, h);
  
}

void loop()
{
  Blynk.run();
  timer.run();
}

Is it working now?

the same error continues…

did you update your ESP as @marvin7 suggests you ?

1 Like

not update . i use this nodemcu maybe 6 months and not have problem . this week have problem … maybe nodemcu broken … i dont have another nodemcu :frowning:

I think @marvin7’s comments were about updating the Arduino ESP Core software that’s used in your Arduino IDE when you compile the code.
If you’re using an older version of the core then you will run into errors with the latest version of Blynk.
The easiest way to check/upgrade your ESP core is to go to Tools, Board, Boards Manager. Scroll down to the bottom of the list and you’ll see esp8266. Click on that entry and you’ll have the option to Upgrade, or pick a specific version of the core.

Pete.

4 Likes

Exactly @PeteKnight… But it seems I got misunderstood.

2 Likes

i have 2.3.0 … when update last version than sketch not compilation .now aagain trying last versiıon update

You should update to Arduino Core 2.4.2 and upgrade the Blynk library to the latest version (there’s been a new release in the last couple of days).

If you’re still getting compilation errors then google the error messages. You may find that the other libraries you are using are out of date, so checking for updates in those libraries is the first thing to try.

Pete.

now im upgrade 2.4.2 and have many error code… im use examples.blynk.cc I use ready codes …

Arduino:1.8.5 (Windows 7), Kart:“NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, 4M (3M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200”

DİKKAT: OneWire kütüphanesindeki ‘’ kategorisi geçerli değil. ‘Uncategorized’ olarak ayarlanıyor.
DİKKAT: UIPEthernet kütüphanesindeki ‘’ kategorisi geçerli değil. ‘Uncategorized’ olarak ayarlanıyor.
DİKKAT: UIPEthernet kütüphanesindeki ‘’ kategorisi geçerli değil. ‘Uncategorized’ olarak ayarlanıyor.
C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:109:38: error: macro “ip_route” requires 2 arguments, but only 1 given

 netif* interface = ip_route(&addr);

                                  ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:36:

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:136:21: error: ‘ip_addr_p_t’ does not name a type

PACK_STRUCT_FIELD(ip_addr_p_t src);

                 ^

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:273:30: note: in definition of macro ‘PACK_STRUCT_FIELD’

#define PACK_STRUCT_FIELD(x) x

                          ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:137:21: error: ‘ip_addr_p_t’ does not name a type

PACK_STRUCT_FIELD(ip_addr_p_t dest);

                 ^

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:273:30: note: in definition of macro ‘PACK_STRUCT_FIELD’

#define PACK_STRUCT_FIELD(x) x

                          ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip4.h:49:0,

             from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip.h:47,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:42,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:38:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/prot/ip4.h:71:8: error: redefinition of ‘struct ip_hdr’

struct ip_hdr {

    ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:0:

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:116:8: error: previous definition of ‘struct ip_hdr’

struct ip_hdr {

    ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:42:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:38:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/ip.h:89:8: error: redefinition of ‘struct ip_pcb’

struct ip_pcb {

    ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:0:

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:89:8: error: previous definition of ‘struct ip_pcb’

struct ip_pcb {

    ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:40:0:

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:119:25: error: conflicting declaration ‘typedef err_t (* netif_output_fn)(struct netif*, struct pbuf*, ip_addr_t*)’

    ip_addr_t *ipaddr);

                     ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:173:17: error: ‘netif_output_fn’ has a previous declaration as ‘typedef err_t (* netif_output_fn)(struct netif*, struct pbuf*, const ip4_addr_t*)’

typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,

             ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:40:0:

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:131:37: error: conflicting declaration ‘typedef err_t (* netif_igmp_mac_filter_fn)(struct netif*, ip_addr_t*, u8_t)’

    ip_addr_t *group, u8_t action);

                                 ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:201:17: error: ‘netif_igmp_mac_filter_fn’ has a previous declaration as ‘typedef err_t (* netif_igmp_mac_filter_fn)(struct netif*, const ip4_addr_t*, enum netif_mac_filter_action)’

typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,

             ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:40:0:

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:136:8: error: redefinition of ‘struct netif’

struct netif {

    ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:225:8: error: previous definition of ‘struct netif’

struct netif {

    ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function ‘netif* netif_add_LWIP2(netif*, ip_addr_t*, ip_addr_t*, ip_addr_t*, void*, netif_init_fn, netif_input_fn)’ conflicts with

#define ICACHE_FLASH_ATTR attribute((section(".irom0.text")))

                                                               ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:256:76: note: in expansion of macro ‘ICACHE_FLASH_ATTR’

   ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)ICACHE_FLASH_ATTR;

                                                                        ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:48:0,

             from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:36:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/arch/cc.h:126:19: error: previous declaration ‘netif* netif_add_LWIP2(netif*, const ip4_addr_t*, const ip4_addr_t*, const ip4_addr_t*, void*, netif_init_fn, netif_input_fn)’ here

#define netif_add netif_add_LWIP2

               ^

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:359:15: note: in expansion of macro ‘netif_add’

struct netif *netif_add(struct netif *netif,

           ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function ‘void netif_set_addr_LWIP2(netif*, ip_addr_t*, ip_addr_t*, ip_addr_t*)’ conflicts with

#define ICACHE_FLASH_ATTR attribute((section(".irom0.text")))

                                                               ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:260:21: note: in expansion of macro ‘ICACHE_FLASH_ATTR’

   ip_addr_t *gw)ICACHE_FLASH_ATTR;

                 ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/arch.h:48:0,

             from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/debug.h:40,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/opt.h:46,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:36:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/arch/cc.h:129:24: error: previous declaration ‘void netif_set_addr_LWIP2(netif*, const ip4_addr_t*, const ip4_addr_t*, const ip4_addr_t*)’ here

#define netif_set_addr netif_set_addr_LWIP2

                    ^

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:365:6: note: in expansion of macro ‘netif_set_addr’

void netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *netmask,

  ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function ‘netif* netif_find(char*)’ conflicts with

#define ICACHE_FLASH_ATTR attribute((section(".irom0.text")))

                                                               ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:267:37: note: in expansion of macro ‘ICACHE_FLASH_ATTR’

struct netif *netif_find(char *name)ICACHE_FLASH_ATTR;

                                 ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:374:15: error: previous declaration ‘netif* netif_find(const char*)’ here

struct netif *netif_find(const char *name);

           ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function ‘void netif_set_ipaddr(netif*, ip_addr_t*)’ conflicts with

#define ICACHE_FLASH_ATTR attribute((section(".irom0.text")))

                                                               ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:271:62: note: in expansion of macro ‘ICACHE_FLASH_ATTR’

void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr)ICACHE_FLASH_ATTR;

                                                          ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:379:6: error: previous declaration ‘void netif_set_ipaddr(netif*, const ip4_addr_t*)’ here

void netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr);

  ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function ‘void netif_set_netmask(netif*, ip_addr_t*)’ conflicts with

#define ICACHE_FLASH_ATTR attribute((section(".irom0.text")))

                                                               ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:272:64: note: in expansion of macro ‘ICACHE_FLASH_ATTR’

void netif_set_netmask(struct netif *netif, ip_addr_t *netmask)ICACHE_FLASH_ATTR;

                                                            ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:380:6: error: previous declaration ‘void netif_set_netmask(netif*, const ip4_addr_t*)’ here

void netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask);

  ^

In file included from C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/ets_sys.h:28:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:29:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/include/c_types.h:87:67: error: declaration of C function ‘void netif_set_gw(netif*, ip_addr_t*)’ conflicts with

#define ICACHE_FLASH_ATTR attribute((section(".irom0.text")))

                                                               ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/netif.h:273:54: note: in expansion of macro ‘ICACHE_FLASH_ATTR’

void netif_set_gw(struct netif *netif, ip_addr_t *gw)ICACHE_FLASH_ATTR;

                                                  ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/ip.h:41:0,

             from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:37:

C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2/tools/sdk/lwip2/include/lwip/netif.h:381:6: error: previous declaration ‘void netif_set_gw(netif*, const ip4_addr_t*)’ here

void netif_set_gw(struct netif *netif, const ip4_addr_t *gw);

  ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp: In member function ‘virtual int WiFiClient::connect(IPAddress, uint16_t)’:

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:109:24: error: cannot convert ‘netif* ()(ip_addr_t) {aka netif* ()(ip4_addr)}’ to ‘netif*’ in initialization

 netif* interface = ip_route(&addr);

                    ^

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:124:37: error: invalid conversion from ‘void ()(void, int8_t) {aka void ()(void, signed char)}’ to ‘tcp_err_fn {aka void ()(void, long int)}’ [-fpermissive]

 tcp_err(pcb, &WiFiClient::_s_err);

                                 ^

In file included from C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\WiFiClient.cpp:38:0:

C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi\src\lwip/tcp.h:321:18: error: initializing argument 2 of ‘void tcp_err(tcp_pcb*, tcp_err_fn)’ [-fpermissive]

void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err)ICACHE_FLASH_ATTR;

              ^

“ESP8266WiFi.h” için birden fazla library bulundu
Kullanılıyor: C:\Users\TARIK\Documents\Arduino\libraries\ESP8266WiFi
Kullanılmıyor: C:\Users\TARIK\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

Just to confirm. You have the correct URL in the Additional Board Manager URLs field?

http://arduino.esp8266.com/stable/package_esp8266com_index.json

im change full library … my have many library files esp8266wifi - esp8266ota - many esp8266 library … im delete aall esp 8266 only install blynk library and upgrade 2.4.2 … now working my project . Thank you very much :slight_smile: