I admit it: I'm a total geek. I love electronics, programming, 3D art, vintage Apple hardware, and whisky. I'm always juggling half a dozen projects. I also enjoy documenting it all: my successes, my failures, my experiences... and everything geeky along the way.


 
 
 
 
 

Mini OLED Clock - Part II | Kevin Rye.net - Main

Kevin Rye

Geek Extraordinaire. Yeh, I said it.

Mini OLED Clock - Part II

OK, so maybe I’m not quite ready to design the PCB yet. Although I was very happy with the way that the clock and alarm features came out, I felt that it needed more. I only used about 15K of the 328’s 32K, so there was definitely room to add some more goodies. I decided to spend another day on the code and implement a timer and stopwatch function.

The timer works as you’d expect.

OLED_timer_0011

I can step through the hours, minutes, and seconds and set them as needed. A press of the up arrow will start the timer. Once it hits 00:00:00, the alarm will sound. The alarm will continue to sound until either the up or down arrow is pressed. If I stop the timer before it completes, I can press the down arrow to reset the timer to 00:00:00.

OLEd_timer_set_0018

The stopwatch feature is very similar to the timer. Actually, once the timer feature was in, it was easy to make the stopwatch. I just needed to copy and paste everything, make it count up instead of down, and cut out the alarm. Just like the timer, the up arrow will start or stop the count, and the down arrow will reset it to 00:00:00.

OLED_stopwatch_0001

One last tweak that I made to the main clock display and the alarm menu was to swap out the “P” for PM for a dot at the left of the hours. I just thought that it looked better.

OLED_pm_0010

Here are the new menus in action…

OLED Clock Timer and Stopwatch

The stopwatch does have a little bit of a jitter to it when it first starts, but I know why that is and it’s an easy fix. I also need to make a few small tweaks to center the text on the display and then I think it’s time to make a PCB.

See this project from start to finish:
Mini OLED Clock - Part I
Mini OLED Clock - Part II
Mini OLED Clock - Part III
Mini OLED Clock - Part IV
Mini OLED Clock - Part V
Mini OLED Clock - Part VI