humidity control using arduino uno
hi , new arduino interested possibilities.i trying control humidity of 2 room using arduino uno,dht 11 sensor misting pump , 2 solinoid valves.my intention when humidity of 1 room sensed below 85 relay connected misting pump , solinoid valve of room have turned on , should turned off if reaches 95 . same procedure room.my problem how make code including 2 dht11 sensors arduino , controling 3 relays according data. have created sketch working 1 mist pump realy , 1 dht 11 want expand new format have mentioned above .pls help.
code: [select]
#include <dht.h>
dht dht;
#define dht11_pin 7
int pinout = 8;
void setup(){
serial.begin(9600);
pinmode(8, output);
}
int pin0ut = low;
void loop()
{
int chk = dht.read11(dht11_pin);
serial.print("temperature = ");
serial.println(dht.temperature);
serial.print("humidity = ");
serial.println(dht.humidity);
if (dht.humidity <85) {
digitalwrite(pinout, high);
}
if (dht.humidity >95){
digitalwrite(pinout, low);
}
delay(500);
}
you have 1 instance of dht class called dht. create 1 called bob.
or, use names both instances reflect located.
that asking trouble. use imagination. i'm sure can come names make sense.
or, use names both instances reflect located.
code: [select]
int pinout = 8;
int pin0ut = low;
that asking trouble. use imagination. i'm sure can come names make sense.
Arduino Forum > Using Arduino > Programming Questions > humidity control using arduino uno
arduino
Comments
Post a Comment