{"id":258,"date":"2026-06-15T22:27:38","date_gmt":"2026-06-15T21:27:38","guid":{"rendered":"https:\/\/myjetsonnano.perseus314.com\/?p=258"},"modified":"2026-06-16T00:18:52","modified_gmt":"2026-06-15T23:18:52","slug":"grove-rtc-test","status":"publish","type":"post","link":"https:\/\/myjetsonnano.perseus314.com\/index.php\/2026\/06\/15\/grove-rtc-test\/","title":{"rendered":"Grove RTC test"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>#include &lt;Wire.h>\n#include &lt;TFT_eSPI.h>\n#include \"DS1307.h\" \n\nTFT_eSPI tft = TFT_eSPI();\nDS1307 clock; \n\nvoid setup() {\n    tft.begin();\n    tft.setRotation(3); \n    tft.fillScreen(TFT_BLACK);\n    \n    clock.begin();\n    \n    \/\/ FORCE START: This kicks the hardware crystal into action\n    clock.startClock(); \n\n    \/\/ Hardcode current time (matching tonight's actual time!)\n    clock.fillByYMD(2026, 6, 15); \n    clock.fillByHMS(22, 20, 0); \n    clock.setTime(); \n}\n\nvoid loop() {\n    clock.getTime(); \n\n    \/\/ If the chip returns impossible data, flash a warning\n    if (clock.minute > 59 || clock.second > 59) {\n        tft.setTextSize(3);\n        tft.setTextColor(TFT_RED, TFT_BLACK);\n        tft.drawString(\"Check Wire \/ Port\", 20, 100);\n    } else {\n        char timeString&#91;16]; \n        sprintf(timeString, \"%02d:%02d:%02d\", clock.hour, clock.minute, clock.second);\n\n        tft.setTextSize(5);\n        tft.setTextColor(TFT_GREEN, TFT_BLACK); \n        tft.drawString(timeString, 45, 100);\n    }\n\n    delay(1000); \n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":259,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,17,22,18],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduinoide","category-c","category-rtc","category-wio-terminal"],"_links":{"self":[{"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":2,"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":266,"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/posts\/258\/revisions\/266"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/media\/259"}],"wp:attachment":[{"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myjetsonnano.perseus314.com\/index.php\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}