loading
3 Comments

Tell us about yourself!

Complete Your Profile
  • Engineer925 commented on TechKiwi's instructable Personalised Word Clock6 months ago
    Personalised Word Clock

    This is the actual change I made, I messed up a little in my original comment, sorry.// Temp test routinevoid hmdmDisplay(){ // display hmdm on monitor Serial.print("Time: "); Serial.print(hour()); Serial.print(":"); Serial.println(minute()); Serial.print("Day: "); Serial.println(day()); Serial.print("Month: "); Serial.println(month()); Serial.print("Year: "); Serial.println(year()); Serial.println(" ");

    This is a great project and since I have a couple Mega 2560's just hanging around...I'm making a couple of these in a 9" x 9" frame for different people and want to get the proper date/time for the Happy Birthday to work properly. It did work the first time out, but having to keep pushing the button to finally get it to the correct time was taking a long time and didn't know what date was really set. So I looked up the correct UNIX time for today and put it in the "settime" line but it still didn't set the rtc. In order to set the time correctly, you must move the two lines of code with the UNIX date down into the statement as below."}else{RTC.set(1408278800); setTime(1408278800);"Serial.println("RTC has set the system time");} It works great the...see more »This is a great project and since I have a couple Mega 2560's just hanging around...I'm making a couple of these in a 9" x 9" frame for different people and want to get the proper date/time for the Happy Birthday to work properly. It did work the first time out, but having to keep pushing the button to finally get it to the correct time was taking a long time and didn't know what date was really set. So I looked up the correct UNIX time for today and put it in the "settime" line but it still didn't set the rtc. In order to set the time correctly, you must move the two lines of code with the UNIX date down into the statement as below."}else{RTC.set(1408278800); setTime(1408278800);"Serial.println("RTC has set the system time");} It works great then. Once getting the current UNIX time/date code and putting it in both places, go down a few lines to the "void loop() {" and remove the // from the from the "hmdmDisplay();" call and then compile the program. Open the serial monitor and check your time and date. Uncheck the scroll box at the bottom of the screen.You can enhance you display by adding lines to the "void hmdmDisplay(){" routine.I changed the lines to read: Serial.print("Time: "); Serial.print(hour());Serial.println(minutes());Serial.print("Day: ");Serial.println(day());Serial.print("Month: ");Serial.println(month());Serial.print("Year: ");Serial.println(year());Serial.println(" "); This makes the serial monitor easier to read and you can verify the actual date and time that was uploaded. Once you have confirmed the correct date and time, your clock may be flashing pretty wildly. That's because of the serial monitor continually updating. To stop this, just remark out the "hmdmDisplay" call that you unremarked previously, and recompile the program.

    This is the actual change I made, I messed up a little in my original comment, sorry.// Temp test routinevoid hmdmDisplay(){ // display hmdm on monitor Serial.print("Time: "); Serial.print(hour()); Serial.print(":"); Serial.println(minute()); Serial.print("Day: "); Serial.println(day()); Serial.print("Month: "); Serial.println(month()); Serial.print("Year: "); Serial.println(year()); Serial.println(" ");

    View Instructable »