'DHT11' was not declared in this scope

0
#include "DHT.h" 
#include <Arduino.h>
#define DHTPIN D1
#define DHTTYPE DHT11
#define LED  D4
#define LED2 D8
#define LED3 D7

DHT dht(DHTPIN, DHTTYPE);

void setup() {
Serial.begin(9600);
dht.begin();
pinMode (LED,  OUTPUT);
pinMode (LED2, OUTPUT);
pinMode (LED3, OUTPUT);
}

void loop() {
Serial.println("prende led");
digitalWrite(LED, LOW);
delay(1000);
digitalWrite(LED, HIGH);
digitalWrite(LED2, HIGH);
delay(1000);
digitalWrite(LED2, LOW);
digitalWrite(LED3, HIGH);
delay(1000);
digitalWrite(LED3, LOW);
Serial.println("apaga led");
}

Although I am importing the "DHT.h" library, I do not recognize the "DHT11" type Does anyone know what's going on?

    
asked by Kevin Gutierrez 20.04.2018 в 06:24
source

1 answer

1

There was a problem between libraries, I was using the default library of DHT which is in the path "/ Documents / Arduino / libreries" that in my case, for another to check the path where the libraries are, it seems that for the DHT11 sensor you recognize it is the adafruit library you can download it at this address link and remember that bookstore also requires this that you can download here link , to solve the problem what I did was delete the DHT library and leave alone those of Adafruit and ready, compiled perfectly.

    
answered by 20.04.2018 / 19:35
source