Hello,
I'm using my arduino to control a fan when the humidity drops below a certain point.
Currently my logic is this with humidity measured every 30 seconds:
if (humidity < 65)
{
digitalWrite(transistorPin, HIGH);
}
else
{
digitalWrite(transistorPin, LOW);
}
This is nice because it maints a rock solid 65%, but the fans run almost every 30 seconds which i want to avoid.
I'd like the fans to run more efficently like a furnace in a home where it mantains a range, say turn on when temp < 65* and off when >=68*. This seems very simple but I am not sure how to approach it in C.
Any advice is appreciated!
Thanks,
Jacob