Timer project

Hey All!

I want to start a count down timer project that meets the following needs

Works in seconds and milliseconds
Triggered from a closed contact, pauses when contact opens

Easy to reset to starting time
easy to change starting time

i'd love to use a OLED display for this but LCD would be fine too. I was thinking a rotary knob with a push button for user input.

I'd love to hear opinions on this and some guidance in the right direction on how to start.

Thanks all!

I would recommend LCD with an L2C connector, simply because it is the easiest to hookup.
There are plenty of samples for reading a single button. Google is your friend. Be sure to include debouncing.
There are also plenty of samples for reading a single potentiometer (the Rotary knob you mention).
The rest is just simple programming. Start programming it. If you get stuck, post your code with a description of the Problem and we'll be happy to help.

Have a look at Planning and Implementing a Program. It has several of the concepts and elements you will need.

I suggest you leave the LCD part until last as it can get in the way of figuring out other stuff. Just use the Serial Monitor. It also makes it easier to help as people won't have an LCD on which to try things on your behalf.

And where @Jaba said "L2C connector" I believe he meant to type "I2C connector"


Oops... Hard to believe I actually had three years typing in high school...
And, I can't even blame that one on autocorrection...
Good catch Robin, of course I meant I2C

I think that a rotary encoder would make a much easier user interface than a potentiometer. It's a bit harder to code, however.
I'd suggest you try to get it working with a potentiometer first, and once that works, and you feel confident enough about your coding, you can replace the potmeter by an encoder. There are some libraries that do all the hard work for you, like PJRC's encoder library.

If you don't know what a rotary encoder is, it's in the scroll wheel of your mouse, or in the timer knob of your microwave oven.
Potentiometers output their absolute position, while rotary encoders output relative movement. This means that they can rotate indefinitely, while a potentiometer only has about 330° of travel.

"seconds and milliseconds" is 60000 possibilities.
Hard with a pot, easier with up/down buttons, but indeed best with a rotary encoder with some sort of slow/fast counting gearbox code.
Some come with an integrated button for start/stop.

And yes, get it going on the serial monitor before you think of adding an external display.