![]() ![]() The LCD shield goes on top, and Uno underneath to create a quite thick sandwich. This gave me access to the pins I needed for the RTC and the two switches. There was a lot of software in this project so when the time came to go from prototype to final assembly I decided to go to the other extreme and keep it as simple and minimalistic. I connected SET/ADJ push-buttons to 10 & A5 and used 11 & 12 as SDA/SCL for a software I2C to the DS3231 real time clock module. Fortunately that leaves pins 10,11,12,13 and A5 free. This shield has a built-in SD-card reader, but no touch screen. The viewing angle is fairly important, from the wrong angle the display is quite washed out. The only other interaction is a) setting a “window” on the screen and b) filling it with colour data. As always, the trick is finding some code which successfully initialises the display (including orientation). The clocks use a simple automatic DLS adjustment class which takes a table of start/end dates. As well as setting the date and time it configures the red/yellow bin cycle (or none) Pressing Set from time display goes to the configuration screen. Pressing Adj from time display cycles through the faces (including a pseudo-face which randomly cycles through faces). The sketch uses all but around 100 bytes of the Uno’s program storage space. There was a little program memory left, so I squeezed in a very simple Pong Clock, again using code from an earlier project. The look is based on this font Triangle ClockĪn adaptation of an eariler project with a triangulated irregular network (TIN) style face, more pretty colours. The LCD colours are appealing, so I experiment with coloured cubes. ![]() The LCD inspired me to add in some additional clock “faces”: The angles come from skipping every 4th row of the digit data, so it’s acos(3/4)=41°, close enough to 45°! The time digits change with a detailed 3-step animation (top flap at 41°, 90° and 131°). It’s alternate weeks and I keep forgetting (this display is optional). As a bonus, across the middle there’s a blinking/flipping colon and also a coloured digit indicating the number of days until I need to put out either the rubbish bin (red) or the recycling (yellow). The time is in big digits across the bottom. The main clock display is the day, date and month in smallish flip-style digits across the top of the LCD (landscape mode). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |