Saturday, September 7, 2013

"Close enough" Wise Clock display mode

Inspired by this article, MikeM added the "Close enough" mode to the functionality of Wise Clock 4.
This new "face" is accessed by pressing the "Set" (middle) button inside the application "BIG".
The time is shown as an approximation, with the hours as an explicit number, the minutes filling the circle of  a 60-minutes clock and the passing seconds represented by a moving red dot on the bottom line. Thus, one can tell time with a 5-minutes "precision" at a very quick glance.

I will soon publish a new software release that will include this mode. It will also include some other changes I've done recently:
  • moved some "app" functionality out of the main class (WiseClock.cpp) into their own separate classes (AppDemo, AppPacman); will probably need to re-organize WiseClock.cpp, since it almost grew beyond a manageable size (currently at 103KB);
  • in dual-display mode (64x16 resolution), extended AppCountdown to include days in addition to hours: minutes:seconds;

Below is a clip of the countdown in action. The bottom line can show (subject to code change) either the current time (HH:MM::SS) or a static line as in the photo above.

For comparison, this is how the countdown looks on the single-display Wise Clock 4.

  • used (long overdue) proper C++ polymorphism (created CAppBase class with pure virtual functions) to simplify the calls to run() functions of each app class (which are now derived from the base class); essentially, most of the case branches in the switch statement are gone and replaced by a simple pCrtApp->run(), as shown in the code snippet below:

switch (crtApp)
case APP_TMP:
ms = runappTmp();
ms = runappNewSD();
ms = runappStats();
ms = runappSetPowerOn();
default:// for all other apps;
ms = pCrtApp->run();


  1. Looking forward to trying this out Florin! Any info somewhere on how to implement the dual display setup?

    1. Good point, I should document this somewhere.
      The second 3mm display is connected using the ribbon cable, as shown in the 3rd photo of this post:
      The Dual-screen also requires a software change, in HT1632.h, where NUM_DISPLAYS must be defined as 2.

    2. I found another post about the dual display:

  2. Excellent...looks like I'm going to have to buy another display or two...;-) What's the limit to how many displays you can chain (presuming power supply can be upgraded)

    1. I daisy chained 3 displays, as shown in this video (I did not have a 4th at the time):
      But I don't think I tested the Wise Clock software with more than 2 displays. Some features may need tweaking.

    2. Three displays looks can never have enough pixel real estate..;-) Perhaps you could have the whole PacMan/Monster crew chase their way across...;-)

      I'm going to get my hands on another display and PM you about the software and case design if that's OK?


  3. Currently the compiled code, with all features enabled, takes 81KB.
    I also noticed that with all features enabled, the memory required at runtime seems to exceed the 16KB RAM of ATmega1284, which is a bit concerning.