Miercoles 11 de Septiembre de 2019 Sensor DHT11 Los siguientes códigos sirven para medir la temperatura y humedad Serial.print("Humidity: "); Serial.print(h); Serial.print(" %\t"); Serial.print("Temperature: "); Serial.print(t); Serial.print(" *C "); if(t>26) ( digitalWrite(5,HIGH);// encender motor ) else ( digitalWrite(5, LOW);// apagar motor ) ) DHT11 // Connect pin 2 of the sensor to whatever your DHTPIN is // Connect pin 4 (on the right) of the sensor to GROUND // Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor int DHTPin = 5; // what digital pin we're connected to DHT dht(DHTPin, DHTTYPE); void setup() { Serial.begin(9600); Serial.println("Moniteroando valores"); ...
Comentarios
Publicar un comentario