The source code is available for download here. It compiles with Arduino IDE 21, with target set to "Sanguino" (see here how you add it to Arduino IDE).
Beside from the porting, I added a new class for "Pong clock" and also a few features (and bug fixes) related to the "big clock", courtesy of Ruud (a belated thanks!).
The "Pong clock" feature, maybe a "first" in multiple colors, is shown in the video below. The code was copied and adapted from Nick's Pong clock.
The "Big clock" feature mentioned previously allows the user to display the time with a selected big font from a few given choices. This was added by Ruud, who also captured it in this video (for Wise Clock 2).
His nice idea is to show the time, round robin, with different fonts, then allow users to select their choice by clicking the "Plus" button.
- displaying the temperature from DS3231;
- set date (day, month, year) from buttons (currently it can be set only from SD card);
- change the time colors to indicate the proximity to the moment the alarm goes on (similarly to IllyClock);
Related posts:
Within your code I see your DisplayTime function where you display the time. I'm just curious how do you specify colors with the ht1632_putchar function? How are the colors changed using the ht1632 library?
ReplyDeleteThe last parameter of the function putchar (as fasr as I remember without looking at the code) is color.
ReplyDeletethis is putchar
ReplyDeletevoid ht1632_putchar(int x, int y, char c)
{
// fonts defined for ascii 32 and beyond (index 0 in font array is ascii 32);
byte charIndex;
// replace undisplayable characters with blank;
if (c < 32 || c > 126)
{
charIndex = 0;
}
else
{
charIndex = c - 32;
}
// move character definition, pixel by pixel, onto the display;
// fonts are defined as one byte per row;
for (byte row=0; row<8; row++)
{
byte rowDots = pgm_read_byte_near(&myfont[charIndex][row]);
for (byte col=0; col<6; col++)
{
if (rowDots & (1<<(5-col)))
ht1632_plot(x+col, y+row, 1);
else
ht1632_plot(x+col, y+row, 0);
}
}
Does each color have a different character set?
karl,
ReplyDeleteYou are right. I am mixing things up, since I am still working on developing this software. I think I was referring to the (un-released) version on my local disk. I looked again at the code that is already published (the above mentioned zip) and there is another function that takes color, and that is ht1632_putSmallChar.
In the version I am working on, I already modified ht1632_putchar to take color as parameter. Sorry for the confusion.