{"id":2791,"date":"2021-08-14T12:36:26","date_gmt":"2021-08-14T19:36:26","guid":{"rendered":"https:\/\/www.donluc.com\/?p=2791"},"modified":"2021-08-14T12:36:26","modified_gmt":"2021-08-14T19:36:26","slug":"project-19-time-global-positioning-system-mk04","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=2791","title":{"rendered":"Project #19: Time &#8211; Global Positioning System &#8211; Mk04"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2791-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #Time #DS3231PrecisionRTC #SHARPMemoryDisplay #GPSReceiver #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\/DL2108Mk05a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05a.png\" alt=\"Global Positioning System\" width=\"720\" height=\"541\" class=\"alignnone size-full wp-image-2793\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05a-300x225.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\/DL2108Mk05b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05b.png\" alt=\"Global Positioning System\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2794\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05b-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\/DL2108Mk05c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05c.png\" alt=\"Global Positioning System\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2795\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05c-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\/DL2108Mk05d.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05d.png\" alt=\"Global Positioning System\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-2796\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05d.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2021\/08\/DL2108Mk05d-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Global Positioning System (GPS)<\/strong><\/p>\n<p>The Global Positioning System (GPS) is a satellite-based radionavigation system owned by the United States government and operated by the United States Space Force. It is one of the global navigation satellite systems (GNSS) that provides geolocation and time information to a GPS receiver anywhere on or near the Earth where there is an unobstructed line of sight to four or more GPS satellites. Obstacles such as mountains and buildings block the relatively weak GPS signals.<\/p>\n<p>A satellite navigation device, colloquially called a GPS receiver, or simply a GPS, is a device that is capable of receiving information from GNSS satellites and then calculate the device&#8217;s geographical position. Using suitable software, the device may display the position on a map, and it may offer routing directions. The Global Positioning System (GPS) is one of a handful of global navigation satellite systems (GNSS) made up of a network of a minimum of 24, but currently 30, satellites placed into orbit by the U.S. Department of Defense.<\/p>\n<p>A satellite navigation device can retrieve (from one or more satellite systems) location and time information in all weather conditions, anywhere on or near the Earth. GPS reception requires an unobstructed line of sight to four or more GPS satellites, and is subject to poor satellite signal conditions. Today, most standalone GPS receivers are used in automobiles. The GPS capability of smartphones may use assisted GPS (A-GPS) technology, which can use the base station or cell towers to provide a faster Time to First Fix (TTFF), especially when GPS signals are poor or unavailable. However, the mobile network part of the A-GPS technology would not be available when the smartphone is outside the range of the mobile reception network, while the GPS aspect would otherwise continue to be available. <\/p>\n<p><strong>DL2108Mk05<\/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 GPS Receiver &#8211; GP-20U7<br \/>\n1 x Mountable Slide Switch<br \/>\n1 x SparkFun Rotary Switch \u2013 10 Position<br \/>\n1 x Black Knob<br \/>\n1 x Breadboard Solderable<br \/>\n11 x 1K Ohm<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 \/>\nGRX &#8211; Digital 16<br \/>\nGTX &#8211; Digital 17<br \/>\nSDA &#8211; Digital 23<br \/>\nSDL &#8211; Digital 22<br \/>\nROT &#8211; Analog A0<br \/>\nVIN &#8211; +3.3V<br \/>\nGND &#8211; GND<\/p>\n<p><strong>DL2108Mk05p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/* \r\n***** Don Luc Electronics \u00a9 *****\r\nSoftware Version Information\r\nProject #19: Time - Global Positioning System - Mk04\r\n08-05\r\nDL2108Mk05p.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 Lithium Ion Battery - 850mAh\r\n1 x GPS Receiver - GP-20U7\r\n1 x Mountable Slide Switch\r\n1 x SparkFun Rotary Switch \u2013 10 Position\r\n1 x Black Knob\r\n1 x Breadboard Solderable\r\n11 x 1K Ohm\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\/\/ Wire\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\/\/ GPS Receiver\r\n#include &lt;TinyGPS++.h&gt;\r\n\/\/ ESP32 Hardware Serial\r\n#include &lt;HardwareSerial.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\/\/ Date and time functions using a DS3231 RTC\r\nRTC_DS3231 RTC;\r\n\/\/ Date\r\nString sDate;\r\n\/\/ Time\r\nString sTime;\r\n\r\n\/\/ ESP32 HardwareSerial\r\nHardwareSerial tGPS(2);\r\n\r\n\/\/ GPS Receiver\r\n#define gpsRXPIN 16\r\n\/\/ This one is unused and doesnt have a conection\r\n#define gpsTXPIN 17\r\n\/\/ The TinyGPS++ object\r\nTinyGPSPlus gps;\r\n\/\/ Latitude\r\nfloat TargetLat;\r\n\/\/ Longitude\r\nfloat TargetLon;\r\n\/\/ GPS Date, Time, Speed, Altitude\r\n\/\/ GPS Date\r\nString TargetDat;\r\n\/\/ GPS Time\r\nString TargetTim;\r\n\/\/ GPS Speeds M\/S\r\nString TargetSMS;\r\n\/\/ GPS Speeds Km\/h\r\nString TargetSKH;\r\n\/\/ GPS Altitude Meters\r\nString TargetALT;\r\n\/\/ GPS Status\r\nString GPSSt = &quot;&quot;;\r\n\r\n\/\/ Rotary Switch - 10 Position\r\n\/\/ Number 1 =&gt; 10\r\nint iRotNum = A0;\r\n\/\/ iRotVal - Value \r\nint iRotVal = 0;\r\n\/\/ Number\r\nint z = 0;\r\n\r\n\/\/ Software Version Information\r\n\/\/ Version\r\nString sver = &quot;19-04&quot;;\r\n\r\nvoid loop()\r\n{\r\n     \r\n  \/\/ Dates and Time\r\n  timeRTC();\r\n\r\n  \/\/ isGPS\r\n  isGPS();\r\n\r\n  \/\/ Rotary Switch\r\n  isRot();\r\n\r\n  delay( 1000 );\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( &quot;Date&quot; );\r\n    display.setCursor(0,30);\r\n    display.println( sDate );\r\n    \/\/ Time\r\n    display.setCursor(0,55);\r\n    display.println( &quot;Time&quot; );\r\n    display.setCursor(0,75);\r\n    display.println( sTime );\r\n    \/\/ Refresh\r\n    display.refresh();\r\n    delay( 100 );\r\n\r\n}\r\n\/\/ Display GPS\r\nvoid isDisplayGPS() {\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    \/\/ GPS Status\r\n    display.setCursor(0,5);\r\n    display.print( &quot;GPS: &quot; );\r\n    display.println( GPSSt );\r\n    \/\/ Target Latitude\r\n    display.setCursor(0,25);\r\n    display.println( &quot;Latitude&quot; );\r\n    display.setCursor(0,45);\r\n    display.println( TargetLat );\r\n    \/\/ Target Longitude\r\n    display.setCursor(0,65);\r\n    display.println( &quot;Longitude&quot; );\r\n    display.setCursor(0,90);\r\n    display.println( TargetLon );\r\n    \/\/ Refresh\r\n    display.refresh();\r\n    delay( 100 );\r\n\r\n}\r\n\/\/ GPS Date, Time, Speed, Altitude\r\nvoid isDisplayGPSDate() {\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    \/\/ GPS\r\n    display.setCursor(0,5);\r\n    display.println( &quot;GPS&quot; );\r\n    \/\/ Date\r\n    display.setCursor(0,30);\r\n    display.println( TargetDat );\r\n    \/\/ Time\r\n    display.setCursor(0,55);\r\n    display.println( TargetTim );\r\n    \/\/ Speed\r\n    display.setCursor(0,75);\r\n    display.print( &quot;M\/S: &quot; );\r\n    display.println( TargetSMS );\r\n    display.setCursor(0,95);\r\n    display.print( &quot;Km\/h: &quot; );\r\n    display.println( TargetSKH );\r\n    display.setCursor(0,115);\r\n    display.print( &quot;Alt: &quot; );\r\n    display.println( TargetALT );\r\n    \/\/ Refresh\r\n    display.refresh();\r\n    delay( 100 );\r\n\r\n}\r\n\/\/ Display Z\r\nvoid isDisplayZ() {\r\n    \/\/ Text Display Z\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    \/\/ Z\r\n    display.setCursor(0,10);\r\n    display.print( &quot;Z: &quot; );\r\n    display.println( z );\r\n    \/\/ Refresh\r\n    display.refresh();\r\n    delay( 100 );\r\n}\r\n<\/pre>\n<p><strong>getGPS.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ GPS Receiver\r\n\/\/ Setup GPS\r\nvoid setupGPS() {\r\n\r\n  \/\/ Setup GPS\r\n  tGPS.begin(  9600 , SERIAL_8N1 , gpsRXPIN , gpsTXPIN );\r\n  \r\n}\r\n\/\/ isGPS\r\nvoid isGPS(){\r\n\r\n  \/\/ Receives NEMA data from GPS receiver\r\n  \/\/ This sketch displays information every time a new sentence is correctly encoded\r\n  while ( tGPS.available() &gt; 0)\r\n    \r\n    if (gps.encode( tGPS.read() ))\r\n    {\r\n     \r\n       \/\/ GPS Vector Pointer Target\r\n       displayInfo();\r\n       \/\/ GPS Date, Time, Speed, Altitude\r\n       displayDTS();\r\n       \r\n    }\r\n  \r\n  if (millis() &gt; 5000 &amp;&amp; gps.charsProcessed() &lt; 10)\r\n  {\r\n   \r\n     while(true);\r\n    \r\n  }\r\n\r\n}\r\n\/\/ GPS Vector Pointer Target\r\nvoid displayInfo(){\r\n\r\n  \/\/ Location\r\n  if (gps.location.isValid())\r\n  {\r\n    \r\n     \/\/ Latitude\r\n     TargetLat = gps.location.lat();\r\n     \/\/ Longitude\r\n     TargetLon = gps.location.lng();\r\n     \/\/ GPS Status 2\r\n     GPSSt = &quot;Yes&quot;;\r\n    \r\n  }\r\n  else\r\n  {\r\n\r\n     \/\/ GPS Status 0\r\n     GPSSt = &quot;No&quot;;\r\n    \r\n  }\r\n\r\n}\r\n\/\/ GPS Date, Time, Speed, Altitude\r\nvoid displayDTS(){\r\n\r\n  \/\/ Date\r\n  TargetDat = &quot;&quot;; \r\n  if (gps.date.isValid())\r\n  {\r\n    \r\n     \/\/ Date\r\n     \/\/ Year\r\n     TargetDat += String(gps.date.year(), DEC);\r\n     TargetDat += &quot;\/&quot;;\r\n     \/\/ Month\r\n     TargetDat += String(gps.date.month(), DEC);\r\n     TargetDat += &quot;\/&quot;;\r\n     \/\/ Day\r\n     TargetDat += String(gps.date.day(), DEC);\r\n    \r\n  }\r\n\r\n  \/\/ Time\r\n  TargetTim = &quot;&quot;;\r\n  if (gps.time.isValid())\r\n  {\r\n    \r\n     \/\/ Time\r\n     \/\/ Hour\r\n     TargetTim += String(gps.time.hour(), DEC);\r\n     TargetTim += &quot;:&quot;;\r\n     \/\/ Minute\r\n     TargetTim += String(gps.time.minute(), DEC);\r\n     TargetTim += &quot;:&quot;;\r\n     \/\/ Secound\r\n     TargetTim += String(gps.time.second(), DEC);\r\n    \r\n  }\r\n\r\n  \/\/ Speed\r\n  TargetSMS = &quot;&quot;;\r\n  TargetSKH = &quot;&quot;;\r\n  if (gps.speed.isValid())\r\n  {\r\n    \r\n     \/\/ Speed\r\n     \/\/ M\/S\r\n     int x = gps.speed.mps();\r\n     TargetSMS = String( x, DEC);\r\n     \/\/ Km\/h\r\n     int y = gps.speed.kmph();\r\n     TargetSKH = String( y, DEC);\r\n\r\n  }\r\n\r\n  \/\/ Altitude\r\n  TargetALT = &quot;&quot;;\r\n  if (gps.altitude.isValid())\r\n  {\r\n    \r\n     \/\/ Altitude\r\n     \/\/ Meters\r\n     int z = gps.altitude.meters();\r\n     TargetALT = String( z, DEC);\r\n\r\n  }\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  \/\/ Date Time\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>getRot.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Rotary Switch\r\n\/\/ isRot - iRotVal - Value\r\nvoid isRot() {\r\n  \r\n  \/\/ Rotary Switch\r\n  z = analogRead( iRotNum );\r\n  \r\n  \/\/ Rotary Switch - 10 Position\r\n  \/\/ Number 1 =&gt; 10\r\n  if ( z &gt;= 3500 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 10;\r\n    \r\n  } else if ( z &gt;= 3000 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 9;\r\n    \r\n  } else if ( z &gt;= 2600 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 8;\r\n    \r\n  } else if ( z &gt;= 2300 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 7;\r\n    \r\n  } else if ( z &gt;= 1900 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 6;\r\n    \r\n  } else if ( z &gt;= 1500 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 5;\r\n    \r\n  } else if ( z &gt;= 1200 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 4;\r\n    \r\n  } else if ( z &gt;= 800 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 3;\r\n    \r\n  } else if ( z &gt;= 400 ) {\r\n\r\n    \/\/ Z\r\n    iRotVal = 2;\r\n    \r\n  } else {\r\n\r\n    \/\/ Z\r\n    iRotVal = 1;\r\n    \r\n  }\r\n\r\n  \/\/ Range Value\r\n  switch ( iRotVal ) {\r\n    case 1:\r\n\r\n      \/\/ Display Date, Time\r\n      isDisplayDate();\r\n       \r\n      break;\r\n    case 2:\r\n\r\n      \/\/ Display GPS\r\n      isDisplayGPS();\r\n         \r\n      break;\r\n    case 3:\r\n\r\n      \/\/ GPS Date, Time, Speed, Altitude\r\n      \/\/isDisplayGPSDate();\r\n      \r\n      break;  \r\n    case 4:\r\n      \r\n      \/\/ GPS Display Date, Time, Speed\r\n      isDisplayGPSDate();\r\n      \r\n      break;\r\n    case 5:\r\n      \r\n      \/\/ Z\r\n      isDisplayZ();\r\n      \r\n      break;\r\n    case 6:\r\n      \r\n      \/\/ Z\r\n      isDisplayZ();\r\n      \r\n      break;       \r\n    case 7:\r\n      \r\n      \/\/ Z\r\n      isDisplayZ();\r\n      \r\n      break; \r\n    case 8:\r\n         \r\n      \/\/ Z\r\n      isDisplayZ();\r\n      \r\n      break; \r\n    case 9:\r\n      \r\n      \/\/ Z\r\n      isDisplayZ();\r\n      \r\n      break;\r\n    case 10:\r\n\r\n      \/\/ Z\r\n      isDisplayZ();\r\n      \r\n      break;\r\n  }\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  \/\/ GPS Receiver\r\n  \/\/ Setup GPS\r\n  setupGPS();\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>&#8212;&#8212;<\/p>\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 #GPSReceiver #Arduino #ESP32 #SparkFunThingPlusESP32WROOM #Project #Programming #Electronics #Microcontrollers #Consultant #VideoBlog &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Global Positioning System (GPS) The Global Positioning System (GPS) is a satellite-based radionavigation system owned by the United States government and operated by the United States Space Force. It is one of the global &#8230; <a title=\"Project #19: Time &#8211; Global Positioning System &#8211; Mk04\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=2791\" aria-label=\"Read more about Project #19: Time &#8211; Global Positioning System &#8211; Mk04\">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,169,89,24,9,84,27,109,33,34],"class_list":["post-2791","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-global-positioning-system","tag-gps-receiver","tag-microcontroller","tag-programming","tag-programming-esp32","tag-projects-2","tag-sparkfun","tag-technology","tag-video-blog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2791","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=2791"}],"version-history":[{"count":2,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2791\/revisions"}],"predecessor-version":[{"id":3643,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/2791\/revisions\/3643"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}