The verbal description of this program is this:
- Configure the display
- Read the temperature from the LM34
- Display the temperature on the LED display
- If the temperature set point is below the current temp, then perform a PWM command and turn on the Peltier device. The amount of drive is proportional to the error between the set point and current temp.
- If the temperature set point is above the current temp, then turn the PWM off.
- If at any point, the temperature set point button is pressed, flash the set point LED and enter the set temp mode. Read the temperature set point from the potentiometer. Press and release the button quickly to exit the set temp mode.
- Keep looping.
I will update this discussion of my code at a later time, hopefully the code will speak for itself. Enjoy!