I recently purchased a nodemcu esp8266 wifi module and tried it with an example program below. I successfully compiled it at first and be able to execute it with the help of blynk app. But i accidentally deleted my blynk library. And when i installed it, the error starts to occur. This is the program…
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk.cc
Blynk community: http://community.blynk.cc
Follow us: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
This example runs directly on ESP8266 chip.
Note: This requires ESP8266 support package:
https://github.com/esp8266/Arduino
Please be sure to select the right ESP8266 module
in the Tools -> Board menu!
Change WiFi ssid, pass, and Blynk auth token to run :)
Feel free to apply it to any other example. It's simple!
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
/* Fill-in your Template ID (only if using Blynk.Cloud) */
//#define BLYNK_TEMPLATE_ID "YourTemplateID"
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}
And here is the error message…
he error that always been happening. Hope you van help me.TIA
Arduino: 1.8.13 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from C:\Users\Luwee\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:37,
from C:\Users\Luwee\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
from C:\Users\Luwee\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp8266.h:24,
from C:\Users\Luwee\Desktop\OJT\New folder\NodeMCU_Program1\NodeMCU_Program1.ino:4:
C:\Users\Luwee\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:36:21: error: redefinition of 'class BlynkTimer'
36 | #define SimpleTimer BlynkTimer
| ^~~~~~~~~~
C:\Users\Luwee\Documents\Arduino\libraries\SimpleTimer/SimpleTimer.h:10:7: note: in expansion of macro 'SimpleTimer'
10 | class SimpleTimer {
| ^~~~~~~~~~~
C:\Users\Luwee\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:36:21: note: previous definition of 'class BlynkTimer'
36 | #define SimpleTimer BlynkTimer
| ^~~~~~~~~~
C:\Users\Luwee\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:41:7: note: in expansion of macro 'SimpleTimer'
41 | class SimpleTimer {
| ^~~~~~~~~~~
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.```
Hope you can help me. TIA