In the interesting of saving pins, I used a simple voltage divider to have three buttons read by one analog pin. This meant that debouncing is done entirely in the software. Since one the the buttons is for mode and the other two for adjustments, they require different levels of debounce. The coding I have for now utilizes one block function getbutton() to get the button press in terms of 0 (none), 1 (mode), 2 (adjustment one), and 3 (adjustment two). The getbutton() function requires a key variable “debouncekey” that is monitored/updated internally and externally. This way the firmware could be checking for mode without the key and debounce instantly, while when in time setting the buttons would not debounce at all once the key is set (instead it relies on a time based debounce in the time setting loop). Of course I understand that what I am attempting to describe here makes very little sense, it just the way I program some things. Once I have the firmware more polished, I will upload it here so you can see the coding itself.

PS – I think the voltage regulator is giving off too much heat and affecting the temp sensor. This is largely due to the 12V wall wart I am using now. Ideally, I will need to find one that is 9V or even 8V to reduce the heat dissipation.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s