Tuesday, May 10, 2011

Watch Winder : Programming Begins

Its been about 2 weeks since I have been working on the main user input method.  So far the code was pretty small and consisted of 4 functions but it was getting messy all just in the main loop so I have begun to make designated functions.  I would like to make libraries for all this but currently I don't quite have a grasp on header files and could use some help created some.

Anyhow, I currently have a way for the user to adjust the "Turns Per Day" then lock in the value using the push button built into the rotary encoder.  This way once the value is locked in turning the rotary encoder will not change the value.  I originally wanted to use EEPROM to store the value but currently I am just using a temp variable which works fine for testing but not when the project is reset.

Here is a short video of how the program works right now:





The circuit is pretty simple. The encoder software I am using sets the encoder pins with internal pull ups and the center common line of the encoder is connected to ground.  The button is also connected in the same way.