

And though the clock’s single-speaker output can be a bit tinny for playing music, it can get surprisingly loud and is just fine for alarm tones and answering Google Assistant prompts. Fortunately, the clock’s two microphones (one in the front, the other in the back) are very sensitive and able to discern commands, even when we used a hushed volume at night. To set the alarm, adjust the volume, or turn on the night-light, it was always much easier to summon help with a “hey, Google …” instead. There’s also a tap at the top to enable the snooze feature, but it sometimes required another touch to register. Unless you’re looking at them from above, the buttons are discernible only by touch, and I often fumbled at night or in the early morning while trying to turn on music or adjust the volume. Even though the clock is outfitted with four evenly distributed buttons-for volume, turning on music, and the alarm settings-they are obscured from view due to the angled wedge design.
#Digital clock numbers code#
Source code is sipped below.Most everything this alarm clock can do is hidden, accessed using its built-in Google Assistant voice controls or with the Google Home app. Other, larger fonts could be created to make it more readable with hours, minutes, and seconds each on their own line. Given the small size and relatively low power of the OLED display it should be possible to make this into a novel wristwatch. If you do not want to make any changes then all you need is to program the RTC.hex file into the starter kit board and you will have a Roman Numeral Clock. I also modified OLED.C to create double height characters from the original fonts supplied to make them more visible. C to create myfonts.c (formerly fonts.c) adding the Roman numerals and main.c became rtcmain.c where I changed the code to add what was needed to display the Roman numerals as well as switch between the display formats. The firmware is almost identical to the original firmware supplied by Microchip except I added the tables to fonts. It you hold this button down the display formats will cycle through all three changing once each second. The lower left button allows selecting the display format as seen below: either just normal decimal digital clock, Roman number digital clock, or both at the same time. While this button is held down the screen colors is reversed and the clock does not update. The lower left button synchronizes the clock on the zero second by holding it until the time reference displays 00 for seconds and then immediately releasing it. There are four buttons associated with the clock The upper left button increments hours, the upper right button increments minutes. If all the pixels are off there is very little power used, and as you turn on more pixels more power is used, but this power is still much less than the typical backlight LCD. Unlike and LCD which requires a separate light source to either transmit through or reflect off of the display each OLED pixel emits its own light. The OLED display is different from and LCD in that each pixel is an active LED. Therefore the total string required is 4(hrs)+1(colon)+7(mins)+1(colon)+7(secs) or 20 characters which will fit into one line across the OLED display. I have used a colon ':' as a separator between hours, minutes, and seconds in the display the same as the decimal clock. Minutes and seconds both go from 1 to 59 and 38 has the most Roman numerals characters at seven, so each of those strings must be seven characters long minimum. Since the hours are only 1 to 12 the most spaces the Roman numerals can take up are 4. I have adapted this code to create a roman numeral string based on the numbers generated by the RTC code. In the programming examples Microchip supplies is example code for a real-time-clock (RTC). The roman numbering system is as follows:Ġ no zero in roman numerals so we use spacesĪn explanation of how each number is formed is found at: Overview The roman numbering system does not include a '0' so it makes the clock look a bit odd at times as you will see. The starter kit board has a small OLED screen suitable for displaying the time in Arabic digits as ell as roman numerals. RTC (real time clock) example program with starter kit modified for this instructable.
#Digital clock numbers download#
MPLAB IDE 8.40 for writing and compiling the code (free download from Microchip website) I have created one using the following parts: There are many ways to display time in both analog and digital, but one never seen by most is a digital Roman numeral clock. See it in action in the quicktime movies attached !
