I can't compile my program

I've just bought nodemcu esp8266 wifi module and try it with a example program, the ESP8266_Standalon example program, about controlling an led using blynk app. It become successful. But i accidentally deleted my blynk library and when i installed it again, I'm now having problem compiling my program. Here's the 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.```

Your post was MOVED to its current location as it is more suitable.

Please post your sketch

Please follow the advice given in the link below when posting code. Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

The program is only an example program, the ESP8266_Standalone program

Whatever it is, please post it here

I have no idea what the ESP8266_Standalone sketch is, where you got it from or whether you have changed it in some way

Please make it as easy to help you as possible

Sorry for the late reply. Here it is

/*************************************************************
  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();
}

My bad. I'm only using mobile phone now, while the program is in my laptop. I need to open it to copy the program that's why i didn't send it much earlier

In the program that i compilled successfully, i only changed the neede infos like the auth token, wifi network and password.

Installed Blynk 1.0.1 library.
Selected Tools->Board: NodeMCU 1.0 (ESP-12E Module)
Opened File->Examples->Blynk->Boards_WiFi->ESP8266_Standalone

Verified without error.

It looks like your problem is a conflict between "SimpleTimer.h" and "BlynkTimer.h".
Does your "NodeMCU_Program1.ino" contain #include "SimpleTimer.h"?

I dunno what happened but it starts to be compiled successfully now. Maybe just a bug or something. But there's another program that I'm having an error again. Should I create another forum or just send it in here? Thank you for all who helped btw

Is the other problem sketch related to this project ?

It's a new project

Then a new topic with a relevant subject line would be appropriate

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.