Posts with «wise clock» label

MixiClock - 4 digits displayed on 8x8 LED matrix

So far, on a 8x8 LED matrix, I have only seen the time displayed with scrolling numbers (beside the geeky binary/hex/tix/dice/dots/bars or other coded formats). There is simply not enough room to statically display 4 digits at once, since the tiniest set of human-readable digits can be defined in a grid not smaller than 3x5 pixels.

I challenged myself to find an intuitive way to display 4 digits on the "standard" 8x8 matrix. I figured that this is possible if using 2 colors. Even though they may overlap a bit (quite literally), digits of different colors can be easily distinguished. This is because the overlap makes a third color: in the case of the bi-color (red/green) LED matrix, it will be orange.

I focused on two aspects:
  • font definition (3x5) as simple as possible, with minimal number of "on" pixels, but still readable;
// tiny 3x5 digits;
byte digit[10][5] = {
  {2, 5, 5, 5, 2},  // 0
  {1, 1, 1, 1, 1},  // 1
  {6, 1, 2, 4, 7},  // 2
  {7, 1, 2, 1, 6},  // 3
  {4, 5, 7, 1, 1},  // 4
  {7, 4, 7, 1, 6},  // 5
  {3, 4, 7, 5, 2},  // 6
  {7, 1, 2, 4, 4},  // 7
  {7, 5, 2, 5, 7},  // 8
  {2, 5, 7, 1, 6},  // 9
};
  • optimal placement of the digits on the 8x8 matrix, so the overlap is minimal (sometimes 1 pixel, very rarely 2 pixels). The photo below shows the starting point. There is more tweaking of the positions in the code, depending on the combination of digits.
















As for the name, there are not too many choices, most of them are already taken, so I hastily settled for "MixiClock" (I am open to suggestions though :).

The sketch, written for my 8x8 bi-color LED matrix shield (also used in the original glass-domed Wise Clock) can be downloaded from here. It should be easy to adapt it to any other RG 8x8 LED matrix. The code also features setting up the clock using two buttons.
















As you may have guessed, the top digits (green) indicate the hours, the bottom ones (red) the minutes. The position of the digits changes slightly depending on the combinations, so that there is no overlap or it is minimal (max 2 pixels, and those will be orange). The code is not final and I am sure it can be improved.

As always, comments and suggestions are welcome.

MixiClock - 4 digits displayed on 8x8 LED matrix

So far, on a 8x8 LED matrix, I have only seen the time displayed with scrolling numbers (beside the geeky binary/hex/tix/dice/dots/bars or other coded formats). There is simply not enough room to statically display 4 digits at once, since the tiniest set of human-readable digits can be defined in a grid not smaller than 3x5 pixels.

I challenged myself to find an intuitive way to display 4 digits on the "standard" 8x8 matrix. I figured that this is possible if using 2 colors. Even though they may overlap a bit (quite literally), digits of different colors can be easily distinguished. This is because the overlap makes a third color: in the case of the bi-color (red/green) LED matrix, it will be orange.

I focused on two aspects:
  • font definition (3x5) as simple as possible, with minimal number of "on" pixels, but still readable;
// tiny 3x5 digits;
byte digit[10][5] = {
  {2, 5, 5, 5, 2},  // 0
  {1, 1, 1, 1, 1},  // 1
  {6, 1, 2, 4, 7},  // 2
  {7, 1, 2, 1, 6},  // 3
  {4, 5, 7, 1, 1},  // 4
  {7, 4, 7, 1, 6},  // 5
  {3, 4, 7, 5, 2},  // 6
  {7, 1, 2, 4, 4},  // 7
  {7, 5, 2, 5, 7},  // 8
  {2, 5, 7, 1, 6},  // 9
};
  • optimal placement of the digits on the 8x8 matrix, so the overlap is minimal (sometimes 1 pixel, very rarely 2 pixels). The photo below shows the starting point. There is more tweaking of the positions in the code, depending on the combination of digits.
















As for the name, there are not too many choices, most of them are already taken, so I hastily settled for "MixiClock" (I am open to suggestions though :).

The sketch, written for my 8x8 bi-color LED matrix shield (also used in the original glass-domed Wise Clock) can be downloaded from here. It should be easy to adapt it to any other RG 8x8 LED matrix. The code also features setting up the clock using two buttons.
















As you may have guessed, the top digits (green) indicate the hours, the bottom ones (red) the minutes. The position of the digits changes slightly depending on the combinations, so that there is no overlap or it is minimal (max 2 pixels, and those will be orange). The code is not final and I am sure it can be improved.

As always, comments and suggestions are welcome.


Old projects revisited

I recently had to revisit the (original, glass domed) WiseClock and the SillyClock.

On WiseClock I streamlined the software (download from here) to only show the time and quotes. It also allows the time to be set from buttons as opposed to the Sony TV remote control (the Reset button on the 8x8 LED matrix shield was re-purposed/re-routed). As well, the character set is now defined in progmem as opposed to internal microcontroller EEPROM (font1.h contains the font definition).
The method I chose for setting the time is to show the hours in red and the minutes in green, and alternate between hours and minutes by pressing the left button (now named "Set"). The left button (the former "Reset") is now named "Inc" and connected to A2/D16 (a pull-up 10k resistor is also required), as shown in the photo.















This button is used for incrementing the hours or minutes. Once the right time is set, the clock will revert to displaying the scrolling quotes and time.

On SillyClock, the software (download from here) can now handle the tilt switch (on the "Dual RG bi-color LED matrix shield") and also sound the alarm.
Two hardware hacks are required:
  • addition of a pull-up 10k resistor on A0;
  • addition of a piezo buzzer between A1 and ground.

Old projects revisited

I recently had to revisit the (original, glass domed) WiseClock and the SillyClock.

On WiseClock I streamlined the software (download from here) to only show the time and quotes. It also allows the time to be set from buttons as opposed to the Sony TV remote control (the Reset button on the 8x8 LED matrix shield was re-purposed/re-routed). As well, the character set is now defined in progmem as opposed to internal microcontroller EEPROM (font1.h contains the font definition).
The method I chose for setting the time is to show the hours in red and the minutes in green, and alternate between hours and minutes by pressing the left button (now named "Set"). The left button (the former "Reset") is now named "Inc" and connected to A2/D16 (a pull-up 10k resistor is also required), as shown in the photo.















This button is used for incrementing the hours or minutes. Once the right time is set, the clock will revert to displaying the scrolling quotes and time.

On SillyClock, the software (download from here) can now handle the tilt switch (on the "Dual RG bi-color LED matrix shield") and also sound the alarm.
Two hardware hacks are required:
  • addition of a pull-up 10k resistor on A0;
  • addition of a piezo buzzer between A1 and ground.