{"id":2775,"date":"2021-08-06T06:50:20","date_gmt":"2021-08-06T13:50:20","guid":{"rendered":"https:\/\/www.donluc.com\/?p=2775"},"modified":"2021-08-06T06:50:20","modified_gmt":"2021-08-06T13:50:20","slug":"project-19-time-sharp-memory-display-mk02","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=2775","title":{"rendered":"Project #19: Time &#8211; SHARP Memory Display &#8211; Mk02"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2775-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #Time #DS3231PrecisionRTC #SHARPMemoryDisplay #Arduino #ESP32 #SparkFunThingPlusESP32WROOM #Project #Programming #Electronics #Microcontrollers #Consultant #VideoBlog<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02a.png\" alt=\"SHARP Memory Display\" width=\"720\" height=\"524\" class=\"alignnone size-full wp-image-2777\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02a-300x218.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02b.png\" alt=\"SHARP Memory Display\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2778\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02b-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02c.png\" alt=\"SHARP Memory Display\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2779\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02c-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02d.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02d.png\" alt=\"SHARP Memory Display\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2780\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02d.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk02d-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Adafruit SHARP Memory Display Breakout &#8211; 1.3 Inches &#8211; 168 Pixels x 144 Pixels Monochrome<\/strong><\/p>\n<p>The 1.3 inches 168 pixels x 144 pixels SHARP Memory LCD display is a cross between an eInk display and an LCD. It has the ultra-low power usage of eInk and the fast-refresh rates of an LCD. This model has a gray background, and pixels show up as black-on-gray for a nice e-reader type display. It does not have a backlight, but it is daylight readable. For dark\/night reading you may need to illuminate the LCD area with external LEDs.<\/p>\n<p>The display is write only which means that it only needs 3 pins to send data. However, the downside of a write-only display is that the entire 168&#215;144 bits must be buffered by the microcontroller driver. That means you cannot use this with an ATmega328 or ATmega32u4. You must use a high-RAM chip such as ATSAMD21, Teensy 3, ESP8266, ESP32, etc. On those chips, this display works great and looks wonderful.<\/p>\n<p><strong>DL2108Mk02<\/strong><\/p>\n<p>1 x SparkFun Thing Plus &#8211; ESP32 WROOM<br \/>\n1 x Adafruit SHARP Memory Display<br \/>\n1 x DS3231 Precision RTC FeatherWing<br \/>\n1 x CR1220 3V Lithium Coin Cell Battery<br \/>\n1 x Terminal Block Breakout FeatherWing<br \/>\n1 x Lithium Ion Battery &#8211; 850mAh<br \/>\n1 x Half-Size Breadboard<br \/>\n1 x SparkFun Cerberus USB Cable<\/p>\n<p><strong>SparkFun Thing Plus &#8211; ESP32 WROOM<\/strong><\/p>\n<p>SCK &#8211; Digital 13<br \/>\nMSI &#8211; Digital 12<br \/>\nSS0 &#8211; Digital 27<br \/>\nSDA &#8211; Digital 23<br \/>\nSDL &#8211; Digital 22<br \/>\nVIN &#8211; +3.3V<br \/>\nGND &#8211; GND<\/p>\n<p><strong>DL2108Mk02p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/* ***** Don Luc Electronics \u00a9 *****\r\nSoftware Version Information\r\nProject #19: Time -SHARP Memory Display - Mk02\r\n08-02\r\nDL2108Mk02p.ino\r\n1 x SparkFun Thing Plus - ESP32 WROOM\r\n1 x Adafruit SHARP Memory Display\r\n1 x DS3231 Precision RTC FeatherWing\r\n1 x CR1220 3V Lithium Coin Cell Battery\r\n1 x Terminal Block Breakout FeatherWing\r\n1 x Qwiic Cable - 50mm\r\n1 x Lithium Ion Battery - 850mAh\r\n1 x Half-Size Breadboard\r\n1 x SparkFun Cerberus USB Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n#include &lt;Wire.h&gt;\r\n\/\/ SHARP Memory Display\r\n#include &lt;Adafruit_SharpMem.h&gt;\r\n#include &lt;Adafruit_GFX.h&gt;\r\n\/\/ Date and time DS3231 RTC\r\n#include &lt;RTClib.h&gt;\r\n\r\n\/\/ SHARP Memory Display\r\n#define SHARP_SCK  13\r\n#define SHARP_MOSI 12\r\n#define SHARP_SS   27\r\n\/\/ Set the size of the display here, e.g. 144x168!\r\nAdafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 144, 168);\r\n\/\/ The currently-available SHARP Memory Display (144x168 pixels)\r\n\/\/ requires &gt; 4K of microcontroller RAM; it WILL NOT WORK on Arduino Uno\r\n\/\/ or other &lt;4K &quot;classic&quot; devices.\r\n#define BLACK 0\r\n#define WHITE 1\r\n\r\n\/\/ Set this to 1000 to get _about_ 1 second timing\r\nconst int CLOCK_SPEED = 1000;\r\n\/\/ Last Draw\r\nunsigned long lastDraw = 0;\r\n\r\n\/\/ Date and time functions using a DS3231 RTC\r\nRTC_DS3231 RTC;\r\nString sDate;\r\nString sTime;\r\n\r\n\/\/ Software Version Information\r\n\/\/ Version\r\nString sver = &quot;19-02&quot;;\r\n\r\nvoid loop()\r\n{\r\n  \r\n  \/\/ Check if we need to update date, time\r\n  if (lastDraw + CLOCK_SPEED &lt; millis())\r\n  {\r\n    \r\n    \/\/ Last Draw\r\n    lastDraw = millis();\r\n    \r\n    \/\/ Dates and Time\r\n    timeRTC();\r\n\r\n    \/\/ is OLED\r\n    \/\/isOLED();\r\n    isDisplayDate();\r\n    \r\n  }\r\n  \r\n}\r\n<\/pre>\n<p><strong>getDisplay.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ SHARP Memory Display\r\n\/\/ SHARP Memory Display - UID\r\nvoid isDisplayUID() {\r\n\r\n    \/\/ Text Display \r\n    \/\/ Clear Display\r\n    display.clearDisplay();\r\n    display.setRotation(4);\r\n    display.setTextSize(3);\r\n    display.setTextColor(BLACK);\r\n    \/\/ Don Luc Electronics\r\n    display.setCursor(0,10);\r\n    display.println( &quot;Don Luc&quot; );\r\n    display.setTextSize(2);\r\n    display.setCursor(0,40);\r\n    display.println( &quot;Electronics&quot; );\r\n    \/\/ Version\r\n    display.setTextSize(3);\r\n    display.setCursor(0,70);\r\n    display.println( &quot;Version&quot; );\r\n    display.setTextSize(2);\r\n    display.setCursor(0,100);   \r\n    display.println( sver );\r\n    \/\/ Refresh\r\n    display.refresh();\r\n    delay( 100 );\r\n    \r\n}\r\n\/\/ Display Date\r\nvoid isDisplayDate() {\r\n\r\n    \/\/ Text Display Date\r\n    \/\/ Clear Display\r\n    display.clearDisplay();\r\n    display.setRotation(4);\r\n    display.setTextSize(2);\r\n    display.setTextColor(BLACK);\r\n    \/\/ Date\r\n    display.setCursor(0,5);\r\n    display.println( sDate );\r\n    \/\/ Time\r\n    display.setCursor(0,30);\r\n    display.println( sTime );\r\n    \/\/ Refresh\r\n    display.refresh();\r\n    delay( 100 );\r\n\r\n}\r\n<\/pre>\n<p><strong>getRTCDS3231.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ DS3231 Precision RTC\r\n\/\/ Setup RTC\r\nvoid setupRTC() {\r\n\r\n  \/\/ DS3231 Precision RTC   \r\n  RTC.begin();\r\n  if (! RTC.begin()) {\r\n    while (1);\r\n  }\r\n  \r\n  DateTime now = RTC.now();\r\n\r\n  if (RTC.lostPower()) {\r\n    \r\n    \/\/ Following line sets the RTC to the date &amp; time this sketch was compiled\r\n    RTC.adjust(DateTime(F(__DATE__), F(__TIME__)));\r\n    \/\/ This line sets the RTC with an explicit date &amp; time, for example to set\r\n    \/\/ August 2, 2021 at 13:53:0 you would call:\r\n    \/\/ RTC.adjust(DateTime(2021, 8, 2, 14, 11, 0));\r\n    \r\n  }\r\n  \r\n}\r\n\/\/ timeRTC\r\nvoid timeRTC() {\r\n\r\n    \/\/ DS3231 Precision RTC\r\n    sDate = &quot;&quot;;\r\n    sTime = &quot;&quot;;\r\n    \/\/ Date Time\r\n    DateTime now = RTC.now();\r\n\r\n    \/\/ sData\r\n    sDate += String(now.year(), DEC);\r\n    sDate += &quot;\/&quot;;\r\n    sDate += String(now.month(), DEC);\r\n    sDate += &quot;\/&quot;;\r\n    sDate += String(now.day(), DEC);\r\n  \r\n    \/\/ sTime\r\n    sTime += String(now.hour(), DEC);\r\n    sTime += &quot;:&quot;;\r\n    sTime += String(now.minute(), DEC);\r\n    sTime += &quot;:&quot;;\r\n    sTime += String(now.second(), DEC);\r\n\r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Setup\r\nvoid setup()\r\n{\r\n  \r\n  \/\/ Give display time to power on\r\n  delay(100);\r\n\r\n  \/\/ Set up I2C bus\r\n  Wire.begin();\r\n\r\n  \/\/ SHARP Display Start &amp; Clear the Display\r\n  display.begin();\r\n  \/\/ Clear Display\r\n  display.clearDisplay();\r\n\r\n  \/\/ Display UID\r\n  isDisplayUID();\r\n  \r\n  \/\/ Setup RTC\r\n  setupRTC();\r\n\r\n  delay( 5000 );\r\n  \r\n}\r\n<\/pre>\n<p><strong>People can contact us:<\/strong> https:\/\/www.donluc.com\/?page_id=1927<\/p>\n<p><strong>Technology Experience<\/strong><\/p>\n<ul>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Robotics<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc&#8230;)<\/li>\n<li>Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc&#8230;)<\/li>\n<li>Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc&#8230;)<\/li>\n<li>Social Media Programming &#038; Integration (Facebook, Twitter, YouTube, Pinterest, etc&#8230;)<\/li>\n<li>Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc&#8230;)<\/li>\n<li>Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc&#8230;)<\/li>\n<li>eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc&#8230;)<\/li>\n<\/ul>\n<p><strong>Instructor<\/strong><\/p>\n<ul>\n<li>PIC Microcontrollers<\/li>\n<li>Arduino<\/li>\n<li>Raspberry Pi<\/li>\n<li>Espressif<\/li>\n<li>Robotics<\/li>\n<li>DOS, Windows, OSX, Linux, iOS, Android, Multi-OS<\/li>\n<li>Linux-Apache-PHP-MySQL<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>J. Luc Paquin \u2013 Curriculum Vitae &#8211; 2021 English &#038; Espa\u00f1ol<\/strong><br \/>\nhttps:\/\/www.jlpconsultants.com\/CV\/LucPaquinCVEngMk2021c.pdf<br \/>\nhttps:\/\/www.jlpconsultants.com\/CV\/LucPaquinCVEspMk2021c.pdf<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.jlpconsultants.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.donluc.com\/DLE\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.donluc.com\/DLHackster\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.hackster.io\/neosteam-labs<br \/>\n<strong>Web:<\/strong> https:\/\/zoom.us\/<br \/>\n<strong>Patreon:<\/strong> https:\/\/www.patreon.com\/DonLucElectronics<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/channel\/UC5eRjrGn1CqkkGfZy0jxEdA<br \/>\n<strong>Twitter:<\/strong> https:\/\/twitter.com\/labs_steam<br \/>\n<strong>Pinterest:<\/strong> https:\/\/www.pinterest.com\/NeoSteamLabs\/<br \/>\n<strong>Instagram:<\/strong> https:\/\/www.instagram.com\/neosteamlabs\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc #Time #DS3231PrecisionRTC #SHARPMemoryDisplay #Arduino #ESP32 #SparkFunThingPlusESP32WROOM #Project #Programming #Electronics #Microcontrollers #Consultant #VideoBlog &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Adafruit SHARP Memory Display Breakout &#8211; 1.3 Inches &#8211; 168 Pixels x 144 Pixels Monochrome The 1.3 inches 168 pixels x 144 pixels SHARP Memory LCD display is a cross between an eInk display and &#8230; <a title=\"Project #19: Time &#8211; SHARP Memory Display &#8211; Mk02\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=2775\" aria-label=\"Read more about Project #19: Time &#8211; SHARP Memory Display &#8211; Mk02\">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":[166,47,49,38,80,59,5,138,82,10,43],"tags":[86,6,92,102,4,87,19,83,85,24,9,84,27,168,109,163,33,34],"class_list":["post-2775","post","type-post","status-publish","format-standard","hentry","category-time","category-adafruit","category-consultant","category-digitalelectronics","category-esp32","category-fritzing","category-microcontrollers","category-patreon","category-program-esp32","category-projects","category-sparkfun","tag-adafruit","tag-arduino","tag-battery","tag-components","tag-consultant","tag-display","tag-electronics","tag-esp32","tag-fritzing","tag-microcontroller","tag-programming","tag-programming-esp32","tag-projects-2","tag-sharp-memory-display","tag-sparkfun","tag-sparkfun-thing-plus-esp32-wroom","tag-technology","tag-video-blog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2775","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=2775"}],"version-history":[{"count":2,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2775\/revisions"}],"predecessor-version":[{"id":4421,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2775\/revisions\/4421"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}