I would like to build a fully automated mushroom fruiting chamber
which is between of 28 & 31 degrees celsius all the time...
Hardware is...Arduino Uno, DHT22 hum & temperature sensor and a relay board
which controls an aquarium heater and a terrarium fogger :).
I hope I am understandable because I am hungarian but on all hungarian forums
people are realy malignant :(.
I made a code after 3 weeks of self-learning...
I have never know Ardunio before :).
So I'ld like to have a help someone for my project :). Please read my code
and correct the wrong paths!
I'ld like to keep the temperature and humidity between 28 and 31 degrees of celsius and between 80 and 95% the humidity!
So if the temperature goes down to 28°c - heater turns ON
temperature goes up to 31°c - heater turns OFF
if the humidity goes down to 80%rH - fogger turns ON
humiditi goes up to 95%rH - fogger turns OFF
Please use indents, and use brackets and indents and spaces in the same way. That makes it easier to read. Look in the menu of the Arduino IDE. The "Tools / Auto Format" will format your code text. Try it
I prefer a single delay at then end of the loop().
Thank you for your reply, it was realy helpful :).
Unfortunately I don't have any hardware yet but I tought I compile a code as long as I have one :).
Once again...Thank You!
You'll want to spend some time reading about the "PID library" or more generally what PID control is used for. This would apply to both the heater and the fogger.
Using the example of the fogger you'll find that keeping a stable humidity range will be particularly tricky. If you turn the fogger on and leave it running until the DHT sensor reports the necessary humidity is reached you're going to find that the humidity will continue to rise as that sprayed mist starts to evaporate into the chamber. Similarly you could find a situation where the humidity drops rapidly if you're introducing trays of mushroom substrate that is drier than what is present in the chamber. You can probably avoid that problem by continually tweaking your "high" and "low" humidity points until everything seems to work right but using PID control will eliminate the majority of that experimentation.