Please help if you can.
I have seen others have had similar issues and have tried the solutions provided, none have worked for me.
I am trying to create a simple sketch to link a DHT11 sensor to Blynk
I am using a ESP8266 on a PC
I have managed to write a sketch to simply blink an on-board LED, compile and upload to the ESP8266. This worked - no problem
The problem comes up when trying to validate the sketch below.
I even tried to simply copy this below code into the sketch simple LED sketch and teh same error occurred.
I get the following error, no matter what I have tried.
I have also Update my library - Deleted library and re-installed - Tried other board selections – Nothing seems to do the trick
ERROR REPORT:
Arduino: 1.8.19 (Windows 10), Board: “Generic ESP8266 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, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200”
C:\Program Files (x86)\Arduino\libraries\DHT_sensor_library-1.4.3\DHT_U.h:36:10: fatal error: Adafruit_Sensor.h: No such file or directory
36 | #include <Adafruit_Sensor.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Generic ESP8266 Module.
This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLANdHxXFH"
#define BLYNK_DEVICE_NAME "BLYNK app project"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
//#define USE_NODE_MCU_BOARD
#include "BlynkEdgent.h"
#include "DHT.h"
#define DHTPIN D2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
float t, h;
void sendSensor()
{
h = dht.readHumidity();
t = dht.readTemperature();
Blynk.virtualWrite(V0, h);
Blynk.virtualWrite(V1, t);
}
void setup()
{
Serial.begin(9600);
dht.begin();
BlynkEdgent.begin();
delay(2000);
timer.setInterval(1000L, sendSensor);
}
void loop()
{
BlynkEdgent.run();
timer.run(); // Initiates SimpleTimer
}```