I still thought the problematic LEDs were functional, so I continued to a new phase of the project. I wanted to display the correct time. The timers inside the Arduino Mega were not meant for this type of time-keeping, but Real-Time Clock (RTC) modules were inexpensive, and as these modules go, they were a mature product with excellent support.
My original plan was to program the base Arduino Mega with the RTC code, and a jumper somewhere would tell it to ignore that code and focus on incoming serial data. Instead, I decided to leave the base code alone and build a module that would command the base to display the clock info. This would be similar to plugging a game cartridge into a game console. This experience would also make it possible to add a game module later on in the same way, which should exercise, and subsequently exorcise, a few bugs before my teammates connect their own games.
My first step was downloading the necessary libraries for the RTC module. The libraries were "DS1307RTC" and "Time." Once installed, I ran the SetTime example, which automagically set the time on my clock, and then ReadTest, which gave me all the necessary code to retrieve the time of day.
With access to a clock and data line, I wrote a program to display numbers on the light pillar. For some reason, the MSD of the minutes would not show. It was 21:45 (9:45 pm) when I took the picture. The top number is a 2, followed by a 1, then a troubling blank space, and a 5 at the end. No rotation code was programmed yet.
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information in this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2019-09-12
My original plan was to program the base Arduino Mega with the RTC code, and a jumper somewhere would tell it to ignore that code and focus on incoming serial data. Instead, I decided to leave the base code alone and build a module that would command the base to display the clock info. This would be similar to plugging a game cartridge into a game console. This experience would also make it possible to add a game module later on in the same way, which should exercise, and subsequently exorcise, a few bugs before my teammates connect their own games.
RTC module, DS1307 with header pins
My first step was downloading the necessary libraries for the RTC module. The libraries were "DS1307RTC" and "Time." Once installed, I ran the SetTime example, which automagically set the time on my clock, and then ReadTest, which gave me all the necessary code to retrieve the time of day.
With access to a clock and data line, I wrote a program to display numbers on the light pillar. For some reason, the MSD of the minutes would not show. It was 21:45 (9:45 pm) when I took the picture. The top number is a 2, followed by a 1, then a troubling blank space, and a 5 at the end. No rotation code was programmed yet.
It is 21:_5 at night
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information in this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2019-09-12
Comments
Post a Comment