ใช้ Time Input Widget กด compile แล้วโปรแกรม error

ผมใช้ timeinput ในการตั้งค่าเวลาครับ แต่พอผมกด compile ตัวโค้ดมัน error ครับ

#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiClientSecure.h>
#include <BlynkSimpleEsp32.h>
#include <SimpleTimer.h>
#include <TimeLib.h>
#include <WidgetRTC.h>

BlynkTimer timer;

WidgetRTC rtc;
WidgetLED ledStatus(V12);
//BLYNK_ATTACH_WIDGET(rtc, V0);

#define TestLED 4                 // on board LED pin assignment
char Date[16];
char Time[16];
char auth[] = "1aji1ly4rX-howFvfRXToOIDDaYlF0vE";
char ssid[] = "NYELOOGBALL";
char pass[] = "egat593618";
long startsecondswd;            // weekday start time in seconds
long stopsecondswd;             // weekday stop  time in seconds
long nowseconds;                // time now in seconds

void setup() {
  
  pinMode(TestLED, OUTPUT);
  digitalWrite(TestLED, LOW); // set LED OFF 
  Serial.begin(115200);
  Serial.println("\Starting");
  Blynk.begin(auth, ssid, pass, IPAddress(128,199,173,118), 8080);
 
 int mytimeout = millis() / 1000;
  while (Blynk.connect() == false) { // try to connect to server for 10 seconds
    if((millis() / 1000) > mytimeout + 8){ // try local server if not connected within 9 seconds
       break;
    }
  }
  rtc.begin();
  timer.setInterval(60000L, activetoday);  // check every minute if schedule should run today 
  timer.setInterval(30000L, reconnectBlynk);  // check every 30s if still connected to server 
}

void activetoday(){        // check if schedule should run today
  if(year() != 1970){
    Blynk.syncVirtual(V13); // sync timeinput widget    
  }
}

BLYNK_WRITE(V13) {
  sprintf(Date, "%02d/%02d/%04d",  day(), month(), year());
  sprintf(Time, "%02d:%02d:%02d", hour(), minute(), second());
  
  TimeInputParam t(param);
  
  Serial.print("Checked schedule at: ");
  Serial.println(Time);
  int dayadjustment = -1;  
  if(weekday() == 1){
    dayadjustment =  6; // needed for Sunday, Time library is day 1 and Blynk is day 7
  }
  if(t.isWeekdaySelected((weekday() + dayadjustment))){ //Time library starts week on Sunday, Blynk on Monday
    Serial.println("Schedule ACTIVE today");
    if (t.hasStartTime()) // Process start time
    {
      Serial.println(String("Start: ") + t.getStartHour() + ":" + t.getStartMinute());
    }
    if (t.hasStopTime()) // Process stop time
    {
      Serial.println(String("Stop : ") + t.getStopHour() + ":" + t.getStopMinute());
    }
    // Display timezone details, for information purposes only 
    Serial.println(String("Time zone: ") + t.getTZ()); // Timezone is already added to start/stop time 
    Serial.println(String("Time zone offset: ") + t.getTZ_Offset()); // Get timezone offset (in seconds)
  
    for (int i = 1; i <= 7; i++) {  // Process weekdays (1. Mon, 2. Tue, 3. Wed, ...)
      if (t.isWeekdaySelected(i)) {
        Serial.println(String("Day ") + i + " is selected");
      }
    } 
    nowseconds = ((hour() * 3600) + (minute() * 60) + second());
    startsecondswd = (t.getStartHour() * 3600) + (t.getStartMinute() * 60);
    //Serial.println(startsecondswd);  // used for debugging
    if(nowseconds >= startsecondswd){    
      Serial.print("LED is ON at");
      Serial.println(String(" ") + t.getStartHour() + ":" + t.getStartMinute());
      if(nowseconds <= startsecondswd + 90){    // 90s on 60s timer ensures 1 trigger command is sent
        digitalWrite(TestLED, HIGH); // set LED ON
        ledStatus.on();
        // code here to switch the relay ON
      }      
    }
    else{
      Serial.println("LED NOT ON today");
      // nothing more to do here, waiting for motor to be turned on later today      
    }
    stopsecondswd = (t.getStopHour() * 3600) + (t.getStopMinute() * 60);
    //Serial.println(stopsecondswd);  // used for debugging
    if(nowseconds >= stopsecondswd){
      Serial.print("LED is OFF at");
      Serial.println(String(" ") + t.getStopHour() + ":" + t.getStopMinute());
      if(nowseconds <= stopsecondswd + 90){   // 90s on 60s timer ensures 1 trigger command is sent
        digitalWrite(TestLED, LOW); // set LED OFF
        ledStatus.off();
        // code here to switch the relay OFF
      }              
    }
    else{
      if(nowseconds >= startsecondswd){  // only show if motor has already started today
        Serial.println("LED is still ON");
        // nothing more to do here, waiting for motor to be turned off later today
      }          
    }
  }
  else{
    Serial.println("Schedule INACTIVE today");
    // nothing to do today, check again in 1 minutes time    
  }
  Serial.println();
}

void reconnectBlynk() {
  if (!Blynk.connected()) {
    if(Blynk.connect()) {
      BLYNK_LOG("Reconnected");
    } else {
      BLYNK_LOG("Not reconnected");
    }
  }
}

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

เป็นบอร์ด esp 32 ครับ

เลือกบอร์ดใหม่เป็น DOIT ESP32 DEVKIT V1 ดูครับ


ยังเป็นเหมือนเดิมเลยครับ

แคปมาให้ดูหน่อยครับในโฟล์เดอร์นี้มีอะไรอยู่บ้าง

copy ตัว error มาวางเลยครับผมไล่ดูไม่ทั่ว

Arduino: 1.8.10 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 921600, None"

In file included from C:\Users\nyeloogball\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:17:0,

                 from C:\Users\nyeloogball\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,

                 from C:\Users\nyeloogball\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32.h:20,

                 from C:\Users\nyeloogball\Documents\Arduino\Test_TimeInput\Test_TimeInput.ino:5:

C:\Users\nyeloogball\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:36:21: error: redefinition of 'class BlynkTimer'

 #define SimpleTimer BlynkTimer

                     ^

C:\Users\nyeloogball\Documents\Arduino\libraries\SimpleTimer/SimpleTimer.h:10:7: note: in expansion of macro 'SimpleTimer'

 class SimpleTimer {

       ^

C:\Users\nyeloogball\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:36:21: error: previous definition of 'class BlynkTimer'

 #define SimpleTimer BlynkTimer

                     ^

C:\Users\nyeloogball\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkTimer.h:41:7: note: in expansion of macro 'SimpleTimer'

 class SimpleTimer {

       ^

Multiple libraries were found for "WiFiClientSecure.h"
 Used: C:\Users\nyeloogball\Documents\Arduino\hardware\espressif\esp32\libraries\WiFiClientSecure
Multiple libraries were found for "BlynkSimpleEsp32.h"
 Used: C:\Users\nyeloogball\Documents\Arduino\libraries\Blynk
Multiple libraries were found for "SimpleTimer.h"
 Used: C:\Users\nyeloogball\Documents\Arduino\libraries\SimpleTimer
Multiple libraries were found for "TimeLib.h"
 Used: C:\Users\nyeloogball\Documents\Arduino\libraries\Time-master
Multiple libraries were found for "WiFi.h"
 Used: C:\Users\nyeloogball\Documents\Arduino\hardware\espressif\esp32\libraries\WiFi
 Not used: C:\Program
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.

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

1.2

โอเคครับ ในไดร์ C ไม่น่ามีอะไรผิด ตอนนี้ศึกษาจากกระทู้นี้ดู น่าจะเคสเดียวกัน