ลองทำตามนี้ครับ
#include <SimpleTimer.h>
พี่ครับตัวนี้สำคัญกับโค้ดที่ผมกำลังจะเขียนไหมครับ
เพราะมันติด
Arduino: 1.8.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 vMHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
______:5:25: error: SimpleTimer.h: No such file or directory
Multiple libraries were found for "ESP8266WiFi.h"
#include <SimpleTimer.h>
Used: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi
^
Multiple libraries were found for "BlynkSimpleEsp8266.h"
compilation terminated.
Used: C:\Users\User\Documents\Arduino\libraries\Blynk
Multiple libraries were found for "DHT.h"
Used: C:\Users\User\Documents\Arduino\libraries\DHT
exit status 1
SimpleTimer.h: No such file or directory
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
ต้องใช้ด้วยครับ ใช้กับบรรทัดนี้
timer.setInterval(1000L, sendUptime);
ขอโทดที่รบกวนเยอะนะครับ
Arduino: 1.8.10 (Windows 10), Board: “NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200”
Multiple libraries were found for “DHT.h”
In file included from C:\Users\User\Documents\Arduino\libraries\DHT\DHT_U.cpp:22:0:
Used: C:\Users\User\Documents\Arduino\libraries\DHT
C:\Users\User\Documents\Arduino\libraries\DHT\DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory
Multiple libraries were found for “SimpleTimer.h”
#include <Adafruit_Sensor.h>
Used: C:\Users\User\Documents\Arduino\libraries\SimpleTimer-master
^
Multiple libraries were found for “ESP8266WiFi.h”
compilation terminated.
Used: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi
Multiple libraries were found for “BlynkSimpleEsp8266.h”
Used: C:\Users\User\Documents\Arduino\libraries\Blynk
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.
ลองเปลี่ยนชื่อโฟล์เดอร์จาก DHT
==> DHT_sensor_library
Arduino: 1.8.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Multiple libraries were found for "SimpleTimer.h"
In file included from C:\Users\User\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.cpp:22:0:
Used: C:\Users\User\Documents\Arduino\libraries\SimpleTimer-master
C:\Users\User\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory
Multiple libraries were found for "ESP8266WiFi.h"
#include <Adafruit_Sensor.h>
Used: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi
^
Multiple libraries were found for "BlynkSimpleEsp8266.h"
compilation terminated.
Used: C:\Users\User\Documents\Arduino\libraries\Blynk
Multiple libraries were found for "DHT.h"
Used: C:\Users\User\Documents\Arduino\libraries\DHT_sensor_library
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.
ไฟล์นี้ติดตั้งแบบไหนครับโหลดมาติดหรือ ติดตั้งจาก Aduino ide
ที่พี่แนบมาเลยครับ
จุดเดิมเลยครับ
//////////////////////////////////////////////////////////////////
Arduino: 1.8.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
C:\Users\User\Desktop\______\______.ino: In function 'void sendUptime()':
______:74:2: error: 'sensors_event_t' was not declared in this scope
sensors_event_t event;
^
______:74:18: error: expected ';' before 'event'
sensors_event_t event;
^
______:75:6: error: 'class DHT' has no member named 'temperature'
dht.temperature().getEvent(&event);
^
______:75:30: error: 'event' was not declared in this scope
dht.temperature().getEvent(&event);
^
______:80:6: error: 'class DHT' has no member named 'humidity'
dht.humidity().getEvent(&event);
^
Multiple libraries were found for "SimpleTimer.h"
Used: C:\Users\User\Documents\Arduino\libraries\SimpleTimer-master
Multiple libraries were found for "Adafruit_Sensor.h"
Used: C:\Users\User\Documents\Arduino\libraries\Adafruit_Unified_Sensor
Multiple libraries were found for "ESP8266WiFi.h"
Used: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266WiFi
Multiple libraries were found for "BlynkSimpleEsp8266.h"
Used: C:\Users\User\Documents\Arduino\libraries\Blynk
Multiple libraries were found for "DHT.h"
Used: C:\Users\User\Documents\Arduino\libraries\DHT_sensor_library
exit status 1
'sensors_event_t' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
ถ้างั้นลบโฟล์เดอร์ DHT ออกแล้วทำตามลิ้งค์พี่ที่ให้ไว้ แล้วเข้าไปลบ ไฟล์ในโฟเดอร์ Arduino15 ออกให้หมดเลย
ผมลบออกไปแล้ว ผมต้องไล่ลงไลเบอรี่ใหม่เลยใช่ไหมครับ
Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Uno"
a:2:10: error: ESP8266WiFi.h: No such file or directory
#include <ESP8266WiFi.h>
^~~~~~~~~~~~~~~
compilation terminated.
exit status 1
ESP8266WiFi.h: No such file or directory
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
ไล่ตามมันบอกไปทีละเคสครับ
ตามนี้
Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Uno"
Multiple libraries were found for "ESP8266WiFi.h"
In file included from C:\Users\User\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:33:0,
Used: C:\Users\User\Documents\Arduino\libraries\ESP8266WiFi
from C:\Users\User\Desktop\a\a.ino:2:
C:\Users\User\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFiType.h:26:10: fatal error: queue.h: No such file or directory
#include <queue.h>
^~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
กรนีนี้ให้ลง queue.h ใช่ไหมครับ