ติด ERROR #define SimpleTimer BlynkTimer ครับ ช่วยผมด้วยครับ

#define BLYNK_PRINT Serial
#include <Blynk.h>
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
#include <SimpleTimer.h>
#include <SimpleDHT.h>
#include <TimeLib.h>
#include <DHT.h>
#include <DHT_U.h>
#include <TridentTD_LineNotify.h> //thank you Mr.TridentTD https://github.com/TridentTD/TridentTD_LineNotify
#define DHTPIN 32 // กำหนดขาให้กับอุปกรณ์ตรวจสอบความชื้น DHT22
#define DHTTYPE DHT22
//////////////////////////////////////////จุดที่เพิ่ม

int setTemp;
int setHumid;

BLYNK_WRITE(V22) //temperature slider in app on pin V22
{
setTemp = param.asInt();
}
BLYNK_WRITE(V23) //temperature slider in app on pin V23
{
setHumid = param.asInt();
}

//////////////////////////////////////////

DHT_Unified dht(DHTPIN, DHTTYPE);
char ssid[] = "xxxx";
char pass[] = "xxxxxxxx";
//* **BLYNK TOKEN** //
char auth[] = "xxxxxxxxx";

// ***LINE TOKEN*** //
#define LINE_TOKEN "NGqeU7GurZLLR9cLcBZkY8uvYLAPDKiZxxxxxx"

SimpleTimer timer;

BLYNK_CONNECTED() {
Blynk.syncAll();
}

void setup()
{
Serial.begin(115200);
Serial.println("xxxxxxx");
Serial.println("xxxxxxxx");
Serial.println(LINE.getVersion());
LINE.setToken(LINE_TOKEN);
LINE.notify("[myarduino.net](http://myarduino.net/)");

Blynk.begin(auth, ssid, pass); //ใส่ชื่อ WIFI and PASSWORD

pinMode(5, OUTPUT);
digitalWrite(5, HIGH);
pinMode(2, OUTPUT); // ***ควบคุมอุณหภูมิ*** ///
digitalWrite(2, HIGH);

dht.begin();

timer.setInterval(1000L, sendUptime);

}

void sendUptime()
{
// *****ชุดคำสั่งการทำงานของอุณหภูมิ***** *//
Blynk.virtualWrite(V5, millis() / 1000);
sensors_event_t event;
dht.temperature().getEvent(&event);
if (!isnan(event.temperature)) {
Blynk.virtualWrite(V1, event.temperature);
if (event.temperature >= setTemp ) {
digitalWrite(2, LOW);
String LineText;
String string1 = "อุณหภูมิ ต่ำกว่ากำหนด";
String string2 = " °C ";
LineText = string1 + event.temperature + string2;
Serial.print("Line");
Serial.println(LineText);
LINE.notify(LineText);
}
else {
digitalWrite(2, HIGH);
}
}
dht.humidity().getEvent(&event);
if (!isnan(event.relative_humidity)) {
Blynk.virtualWrite(V2, event.relative_humidity);
if (event.temperature >= setHumid ) {
digitalWrite(4, LOW);
String LineText;
String string1 = "ความชื้น ต่ำกว่ากำหนด ";
String string2 = " %";
LineText = string1 + event.temperature + string2;
Serial.print("Line ");
Serial.println(LineText);
LINE.notify(LineText);
}
else {
digitalWrite(4, HIGH);
}
}
}

//*********************************************************//

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

}

ตอนนี้ error ขึ้นว่าไร ใช้บอร์ดอะไรถ่ายมาดูหน่อยครับ

ใช้ ESP8266 ครับ ยังแก้ error
ไม่ได้เลยครับ

ใช้ esp8266 แล้วทำไมใช้ library ของ esp32 ละครับ ลบบรรทัดนี้ออกครับ

แล้วก็เลือกบอร์ดให้ถูกด้วยครับ ตอนแรกที่ไม่ถามเพราะเห็นเลือกบอร์ดมาเป็น esp32 ตั้งแต่แรก แต่ใช้ esp8266 ก็เลยงงๆ

โค้ตชุดนี้ผม verify ผ่าน ด้วย ESP32

#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
#include <SimpleTimer.h>
#include <SimpleDHT.h>
#include <TimeLib.h>
#include <DHT.h>
#include <DHT_U.h>
#include <TridentTD_LineNotify.h> //thank you Mr.TridentTD https://github.com/TridentTD/TridentTD_LineNotify
#define DHTPIN 32 // กำหนดขาให้กับอุปกรณ์ตรวจสอบความชื้น DHT22
#define DHTTYPE DHT22
//////////////////////////////////////////จุดที่เพิ่ม

int setTemp;
int setHumid;

BLYNK_WRITE(V22) //temperature slider in app on pin V22
{
setTemp = param.asInt();
}
BLYNK_WRITE(V23) //temperature slider in app on pin V23
{
setHumid = param.asInt();
}

//////////////////////////////////////////

DHT_Unified dht(DHTPIN, DHTTYPE);
char ssid[] = "xxxx";
char pass[] = "xxxxxxxx";
//* **BLYNK TOKEN** //
char auth[] = "xxxxxxxxx";

// ***LINE TOKEN*** //
#define LINE_TOKEN "NGqeU7GurZLLR9cLcBZkY8uvYLAPDKiZxxxxxx"

SimpleTimer timer;

BLYNK_CONNECTED() {
Blynk.syncAll();
}

void setup()
{
Serial.begin(115200);
Serial.println("xxxxxxx");
Serial.println("xxxxxxxx");
Serial.println(LINE.getVersion());
LINE.setToken(LINE_TOKEN);
LINE.notify("[myarduino.net](http://myarduino.net/)");

Blynk.begin(auth, ssid, pass); //ใส่ชื่อ WIFI and PASSWORD

pinMode(5, OUTPUT);
digitalWrite(5, HIGH);
pinMode(2, OUTPUT); // ***ควบคุมอุณหภูมิ*** ///
digitalWrite(2, HIGH);

dht.begin();

timer.setInterval(1000L, sendUptime);

}

void sendUptime()
{
// *****ชุดคำสั่งการทำงานของอุณหภูมิ***** *//
Blynk.virtualWrite(V5, millis() / 1000);
sensors_event_t event;
dht.temperature().getEvent(&event);
if (!isnan(event.temperature)) {
Blynk.virtualWrite(V1, event.temperature);
if (event.temperature >=  'setTemp' ) {
digitalWrite(2, LOW);
String LineText;
String string1 = "อุณหภูมิ ต่ำกว่ากำหนด";
String string2 = " °C ";
LineText = string1 + event.temperature + string2;
Serial.print("Line");
Serial.println(LineText);
LINE.notify(LineText);
}
else {
digitalWrite(2, HIGH);
}
}
dht.humidity().getEvent(&event);
if (!isnan(event.relative_humidity)) {
Blynk.virtualWrite(V2, event.relative_humidity);
if (event.temperature >=  'setHumid' ) {
digitalWrite(4, LOW);
String LineText;
String string1 = "ความชื้น ต่ำกว่ากำหนด ";
String string2 = " %";
LineText = string1 + event.temperature + string2;
Serial.print("Line ");
Serial.println(LineText);
LINE.notify(LineText);
}
else {
digitalWrite(4, HIGH);
}
}
}

//*********************************************************//

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

}

ผม copy โค๊ดชุดที่พี่โพส เลือกบอร์ด esp 32 แล้ว แต่ไม่ผ่าน ติด error เหมือนเดิม แสดงว่าคอมผมมีปัญหารึเปล่าครับ

ลง library บอร์ด esp32 รึยังครับ

ลงแล้วครับ

ผมต้องลง วินโดว์ใหม่มั้ยครับ

ไม่เกี่ยวครับ

ใช้ Arduino IDE เวอร์ชันไรครับ

1.8.8 ครับ

ขอ copy error เต็มๆ มาอีกทีครับ

Arduino: 1.8.8 (Windows 8.1), Board: "ESP32 Dev Module, Disabled, Default, 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

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

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

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

                 from D:\ESP32 Project Test\dht22_test\dht22_test.ino:3:

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

 #define SimpleTimer BlynkTimer

                     ^

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

 class SimpleTimer {

       ^

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

 #define SimpleTimer BlynkTimer

                     ^

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

 class SimpleTimer {

       ^

exit status 1
Error compiling for board ESP32 Dev Module.

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

เข้าโฟร์เดอร์นี้แล้วแคปมาดูหน่อยว่ามี ตัวนี้ไหม

ข้างในเป็นแบบนี้ไหม

ทำโฟเดอร์นี้เป็น .zip file แล้วส่งมาให้หน่อยครับ