Hi, i want to control the humidity and temperature of the greenhouse and aviculture,so i need a good and simple algorithm,I use SHT75 (a digital temperature and humidity sensor for measuring temperature and humidity) and PIC16F877A. I don't have any problem to work with this sensor and microcontroller,i just want a good idea for controlling algorithm.Imagine we have 4 variables: 1)real_temp 2)real_humid 3)temp_value 4)humid_value
variables 1 and 2 are real temperature and real RH that measured by sensor and variables 3 and 4 are favorite values for temperature and humidity that inserted by operator with keyboard.I want to measure temperature and humidity every 10 minutes and execute the controlling program in a subroutine so i want an algorithm that control the temperature and humidity and adjust them in favorite values.