{"id":1519,"date":"2018-04-17T14:09:09","date_gmt":"2018-04-17T21:09:09","guid":{"rendered":"http:\/\/www.donluc.com\/?p=1519"},"modified":"2018-04-17T14:09:09","modified_gmt":"2018-04-17T21:09:09","slug":"project-7-rgb-lcd-shield-mk01","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=1519","title":{"rendered":"Project #7: RGB LCD Shield &#8211; Mk01"},"content":{"rendered":"<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/04\/DonLuc1804Mk07a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/04\/DonLuc1804Mk07a.png\" alt=\"\" width=\"720\" height=\"540\" class=\"alignnone size-full wp-image-1520\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/04\/DonLuc1804Mk07a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/04\/DonLuc1804Mk07a-300x225.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1519-1\" width=\"720\" height=\"408\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/04\/DonLuc1804Mk07.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/04\/DonLuc1804Mk07.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2018\/04\/DonLuc1804Mk07.mp4<\/a><\/video><\/div>\n<p><strong>RGB LCD Shield<\/strong><br \/>\n<strong>Project #7 \u2013 Mk01<\/strong><\/p>\n<p><strong>ChronoDot<\/strong><\/p>\n<p>1 x RGB LCD Shield 16\u00d72 Character Display<br \/>\n1 x Arduino Uno &#8211; R3<br \/>\n1 x ProtoScrewShield<br \/>\n1 x ChronoDot<br \/>\n4 x Jumper Wires 3&#8243; M\/M<br \/>\n1 x Half-Size Breadboard<\/p>\n<p>A5<br \/>\nA4<br \/>\nGND<br \/>\n3.3V<\/p>\n<p><strong>DonLuc1804Mk07a.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"DonLuc1804Mk07a.ino\">\r\n\/\/ ***** Don Luc *****\r\n\/\/ Software Version Information\r\n\/\/ 1.03\r\n\/\/ DonLuc1804Mk07 1.03\r\n\/\/ RGB LCD Shield\r\n\/\/ ChronoDot\r\n\r\n\/\/ include the library code:\r\n#include &lt;Wire.h&gt;\r\n#include &lt;Adafruit_MCP23017.h&gt;\r\n#include &lt;Adafruit_RGBLCDShield.h&gt;\r\n#include &lt;RTClib.h&gt;\r\n#include &lt;RTC_DS3231.h&gt;\r\n\r\nRTC_DS3231 RTC;\r\n\r\n#define SQW_FREQ DS3231_SQW_FREQ_1024     \/\/0b00001000   1024Hz\r\n\r\nAdafruit_RGBLCDShield RGBLCDShield = Adafruit_RGBLCDShield();\r\n\r\n#define GREEN 0x2\r\n\r\n\/\/ ChronoDot\r\nchar datastr[100];\r\n\r\nvoid loop() {\r\n\r\n  RGBLCDShield.clear();\r\n\r\n  timeChrono();\r\n   \r\n  delay(2000);  \r\n\r\n}\r\n<\/pre>\n<p><strong>ChronoDot.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"ChronoDot.ino\">\r\nvoid setupChrono() {\r\n\r\n  RTC.begin();\r\n  \r\n  DateTime now = RTC.now();\r\n  DateTime compiled = DateTime(__DATE__, __TIME__);\r\n  RTC.getControlRegisterData( datastr[0] );  \r\n  \r\n}\r\n\r\nvoid timeChrono() {\r\n \r\n    DateTime now = RTC.now();\r\n    DateTime isNow (now.unixtime() + 6677 * 86400L + 42500);\r\n\r\n    \/\/ set the cursor to column 0, line 0\r\n    RGBLCDShield.setCursor(0,0);\r\n    RGBLCDShield.print(isNow.year(), DEC);\r\n    RGBLCDShield.print(&#039;\/&#039;);\r\n    RGBLCDShield.print(isNow.month(), DEC);\r\n    RGBLCDShield.print(&#039;\/&#039;);\r\n    RGBLCDShield.print(isNow.day(), DEC);\r\n    RGBLCDShield.print(&#039; &#039;);\r\n    RGBLCDShield.print(&#039; &#039;);\r\n\r\n    \/\/ set the cursor to column 0, line 1\r\n    RGBLCDShield.setCursor(0, 1);\r\n    RGBLCDShield.print(isNow.hour(), DEC);\r\n    RGBLCDShield.print(&#039;:&#039;);\r\n    RGBLCDShield.print(isNow.minute(), DEC);\r\n    RGBLCDShield.print(&#039;:&#039;);\r\n    RGBLCDShield.print(isNow.second(), DEC);\r\n    RGBLCDShield.print(&#039; &#039;);\r\n    RGBLCDShield.print(&#039; &#039;);\r\n    \r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"setup.ino\">\r\nvoid setup() {\r\n\r\n  \/\/ set up the LCD&#039;s number of columns and rows: \r\n  RGBLCDShield.begin(16, 2);\r\n\r\n  RGBLCDShield.print(&quot;Don Luc&quot;);\r\n  RGBLCDShield.setBacklight(GREEN);\r\n   \/\/ set the cursor to column 0, line 1\r\n  RGBLCDShield.setCursor(0, 1);\r\n  \/\/ print the number of seconds since reset:\r\n  RGBLCDShield.print(&quot;ChronoDot&quot;); \r\n\r\n  delay(5000);\r\n\r\n  \/\/ ChronoDot\r\n  setupChrono();\r\n  \r\n  delay(1500); \/\/wait for the sensor to be ready \r\n  \r\n}\r\n<\/pre>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>RGB LCD Shield Project #7 \u2013 Mk01 ChronoDot 1 x RGB LCD Shield 16\u00d72 Character Display 1 x Arduino Uno &#8211; R3 1 x ProtoScrewShield 1 x ChronoDot 4 x Jumper Wires 3&#8243; M\/M 1 x Half-Size Breadboard A5 A4 GND 3.3V DonLuc1804Mk07a.ino \/\/ ***** Don Luc ***** \/\/ Software Version Information \/\/ 1.03 \/\/ &#8230; <a title=\"Project #7: RGB LCD Shield &#8211; Mk01\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=1519\" aria-label=\"Read more about Project #7: RGB LCD Shield &#8211; Mk01\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71,47,50,38,5,58,10],"tags":[],"class_list":["post-1519","post","type-post","status-publish","format-standard","hentry","category-rgb-lcd-shield","category-adafruit","category-arduino","category-digitalelectronics","category-microcontrollers","category-arduino-programming","category-projects"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1519"}],"version-history":[{"count":5,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1519\/revisions"}],"predecessor-version":[{"id":1526,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/1519\/revisions\/1526"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}