ICE TUBE ROLLING COLONS

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

ICE TUBE ROLLING COLONS

Post by russell 27 »

The original display looks just fine, but kinda wanted something going on in there, the empty space that is, between the hours -to- minutes -to- seconds. Tried just a dash or decimal, not bad. Adding whole characters could make things hard to read. An animated roll, I thought, that's the ticket; Rolling Colons. I thank John Archie for his help, making my idea happen. There are all sorts of animation combinations possible, If you want to personalize, I offer the basis. For the experienced in "C", this is probably easy peasy. I'm in the process of learning C myself, so I hope this extra detail is of help.

You can see an example in the video HERE
Segment.png
Segment.png (9.52 KiB) Viewed 689 times
The above image shows the letter designation for the individual segments a thru h, This is pretty much the same for all seven segment displays. hex values for the code are: a= 0x08; b= 0x40; c= 0x20; d= 0x10; e= 0x08; f= 0x04; g= 0x02; h= 0x01

The LOOP image shows the designated segments that are switched on and off to make the roll animation.
C, D, E, G or 0x20, 0x10, 0x08, 0x02

The code for this is shown below, and is located near the top of iv.c

Code: Select all

    #define TIME_SEP_SIZE  4
    uint8_t time_sep1[]  = {0x20, 0x10, 0x08, 0x02};
    uint8_t time_sep2[]  = {0x20, 0x10, 0x08, 0x02};
    uint8_t time_sep_idx = 0;

    #define TIME_SEP_DELAY_MAX 200
    uint16_t time_sep_delay = 0;
time_sep1 is for digit [3] between hours and minutes, and time_sep2 is for digit [6] between minutes and seconds.
DELAY_MAX (200) is for time duration

Code: Select all

      if(++time_sep_delay >= TIME_SEP_DELAY_MAX) {
        time_sep_delay = 0;

        if(++time_sep_idx >= TIME_SEP_SIZE) {
          time_sep_idx = 0;
        }
      }

      if(displaymode == SHOW_TIME) {
        display[3] = time_sep1[time_sep_idx];
        display[6] = time_sep2[time_sep_idx];
      }
By changing the variables you can make your own personal animation. For example if you wanted an opposing figure eight, that code example is shown below, Kinda like this one.

Code: Select all

#define TIME_SEP_SIZE  8
uint8_t time_sep1[]  = {0x02, 0x40, 0x80, 0x04, 0x02, 0x20, 0x10, 0x08};
uint8_t time_sep2[]  = {0x02, 0x08, 0x10, 0x20, 0x02, 0x04, 0x80, 0x40};
uint8_t time_sep_idx = 0;

#define TIME_SEP_DELAY_MAX 200
uint16_t time_sep_delay = 0;
Here is the the Zip file:
Rolling colons.zip
(66.79 KiB) Downloaded 54 times
There are three folders included, one for rolling colons, and one for figure 8, both include full code and hex, so you can just flash and try. The third folder is the original kit hex, just in case you want to flash back. There are two other changes to the code. I removed the leading zero from hours, in 12 hour mode, and I added display time duration to day, date and alarm time of about 2.5 seconds, when corresponding button is pressed. I did try all these, so, everything should be good to go. I compiled in WINAVR.


Russell
Last edited by russell 27 on Sat Nov 09, 2013 5:13 pm, edited 1 time in total.

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: ICE TUBE ROLLING COLONS

Post by jarchie »

The animated colons are a nice touch! Eventually I'll incorporate a similar time display into my xmas firmware.

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: ICE TUBE ROLLING COLONS

Post by jarchie »

I incorporated a similar animation into one of the time displays of xmas-icetube a month ago, but thought it would be nice to have a set of menu-selectable colon representations.

So I would like to solicit ideas for characters (animated or not) that would make good colon-type separators. Obviously, the lowly, nonanimated space would be one option and Russell's animated little circle another. But does anyone have other ideas? I can think of alternatives myself, but suspect that ideas contributed by other Ice Tube Clock users will be far superior.

User avatar
phild13
 
Posts: 247
Joined: Mon Sep 10, 2012 1:05 pm

Re: ICE TUBE ROLLING COLONS

Post by phild13 »

Since the display was most likely used in early calculators the display is a bit limited with options.
Personally, I like just a space between the hour min sec.

flash the decimal point H

flash the G element for a flashing dash

You could have an alternating flashing vertical bar by alternate flashing elements F E (both on at once) and B C (both on at once) giving a alternating vertical bar look, but it might be confused with a 1 at certain times.

Taking that idea further you could flash F E then A D then B C and then reverse back which would give a moving look to the vertical bar.

you could use a rolling 5 (AFGCD) where you generate a 5 then reverse it ABGED or do it one element at a time

alternate flashing top to bottom AGD then bottion to top DGA or just repeat (cascade)Top to bottom AGD, AGD, ~~ and so on.

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: ICE TUBE ROLLING COLONS

Post by jarchie »

Thank you for the ideas!

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”