okay, I have an H-Bridge controlled motor permanently attached to a potentiometer to report the motors position. This motor controls the amount of hot/cold air flowing into my car. Temp range is 60 to 90 degrees F. with the arduino reading the pot, 75 degrees (half hot and half cold) would read 511.5 the increment per degree is 34.1 (0 to 1023), or 170.5 for 5 degree increments. I need some software examples, or just tell me a function, to have the arduino monitor the pot to stop the motor at an entered temp (or close) and if the temp deviates too much (according to the thermistor), to move one direction or the other. AGAIN, I'm not asking someone to write my code, just point me in the right direction please...!
Hi,
calculate the temperature from the poti:
Temp = 75 + (analogRead(..)-511)/34;
If the value of Temp i bigger than the temperatur you want + a hysteresis-alue (1 degree for example) , switch the motor to "close" direction. If the value Temp is lower than the temperature you want, switch the motor on to "open"-direction, otherwise switch the motor off.
Mike