Incubo.

Materiales eléctricos:

1. Transistor 3906

2. Relevo 5v

3. Ventilador 5v

4. Calentador aire 220v

5. Sensor DHT22

6. Arduino minipro

7. Clavija y cable 220v

Código version 0.1 en evolución:

include “DHT.h”

define DHTPIN 2 // Digital pin connected to the DHT sensor

define DHTTYPE DHT22 // DHT 22

DHT dht(DHTPIN, DHTTYPE);
void setup() {
Serial.begin(9600);
Serial.println(F(“incubo test!”));
dht.begin();
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop() {
delay(2000);
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t)) {
Serial.println(F(“Failed to read from DHT sensor!”));
return;
}
float hic = dht.computeHeatIndex(t, h, false);
Serial.print(F(“% Temperature: “));
Serial.print(t);
Serial.print(F(“°C “));
if(t<36.80){
digitalWrite(10, LOW); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(10, HIGH); // turn the LED off by making the voltage LOW
digitalWrite(11, LOW);
}else{ digitalWrite(10, LOW); digitalWrite(11, HIGH); }
}