#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "DHT.h"
DHT dht;
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "W2iI4FjaWby_evhBLV1BHHre8gxswBfR";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Jab112";
char pass[] = "123454321";
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
Serial.println();
Serial.println("Status\tHumidity (%)\tTemperature (C)\t(F)");
dht.setup(2); // data pin 2
}
void loop()
{
delay(dht.getMinimumSamplingPeriod());
float humidity = dht.getHumidity(); // ดึงค่าความชื้น
float temperature = dht.getTemperature(); // ดึงค่าอุณหภูมิ
Serial.print(dht.getStatusString());
Serial.print("\t");
Serial.print(humidity, 1);
Serial.print("\t\t");
Serial.print(temperature, 1);
Serial.print("\t\t");
Serial.println(dht.toFahrenheit(temperature), 1);
Blynk.run();
delay(100);
Blynk.virtualWrite(V0, temperature);
Blynk.virtualWrite(V1, humidity);
}
มันแสดงงี้ครับ ต้องแก้ยังไง
Arduino: 1.8.16 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (2M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
sketch_oct01a:4:32: fatal error: BlynkSimpleEsp8266.h: No such file or directory
compilation terminated.
exit status 1
BlynkSimpleEsp8266.h: No such file or directory
สวีสดีครับ ใครพอมีวิธีแก้ โปรแกรมไม่เห็นไฟล์บ้างครับ esp8266
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "DHT.h"
DHT dht;
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "W2iI4FjaWby_evhBLV1BHHre8gxswBfR";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Jab112";
char pass[] = "123454321";
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
Serial.println();
Serial.println("Status\tHumidity (%)\tTemperature (C)\t(F)");
dht.setup(2); // data pin 2
}
void loop()
{
delay(dht.getMinimumSamplingPeriod());
float humidity = dht.getHumidity(); // ดึงค่าความชื้น
float temperature = dht.getTemperature(); // ดึงค่าอุณหภูมิ
Serial.print(dht.getStatusString());
Serial.print("\t");
Serial.print(humidity, 1);
Serial.print("\t\t");
Serial.print(temperature, 1);
Serial.print("\t\t");
Serial.println(dht.toFahrenheit(temperature), 1);
Blynk.run();
delay(100);
Blynk.virtualWrite(V0, temperature);
Blynk.virtualWrite(V1, humidity);
}
มันแสดงงี้ครับ ต้องแก้ยังไง
Arduino: 1.8.16 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (2M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
sketch_oct01a:4:32: fatal error: BlynkSimpleEsp8266.h: No such file or directory
compilation terminated.
exit status 1
BlynkSimpleEsp8266.h: No such file or directory