{"id":4952,"date":"2026-09-02T08:40:50","date_gmt":"2026-09-02T15:40:50","guid":{"rendered":"https:\/\/www.donluc.com\/?p=4952"},"modified":"2026-09-02T08:40:50","modified_gmt":"2026-09-02T15:40:50","slug":"project-15-environment-gps-and-rtc-mk48","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=4952","title":{"rendered":"Project #15: Environment \u2013 GPS and RTC \u2013 Mk48"},"content":{"rendered":"<div style=\"width: 1200px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4952-1\" width=\"1200\" height=\"675\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #GPS #RTC #Environment #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;-<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05a.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05a.jpg\" alt=\"GPS and RTC\" width=\"720\" height=\"581\" class=\"alignnone size-full wp-image-4954\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05a.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05a-300x242.jpg 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\/2026\/09\/DL2608Mk05b.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05b.jpg\" alt=\"GPS and RTC\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4955\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05b.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05b-300x200.jpg 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\/2026\/09\/DL2608Mk05c.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05c.jpg\" alt=\"GPS and RTC\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4956\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05c.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/09\/DL2608Mk05c-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Gravity: GNSS GPS BeiDou Receiver Module<\/strong><\/p>\n<p>The GNSS receiver module supports multiple satellite systems for accurate, high-speed positioning in various environments. It&#8217;s compatible with I2C\/UART devices. GNSS stands for Global Navigation Satellite System. The main GNSS systems include GPS, GLONASS, QZSS, and BeiDou. These satellite systems transmit signals to the earth, allowing the receiver to determine its own position by calculating the propagation time of the signals and the position of the receiving satellite, thus achieving functions such as positioning and navigation.<\/p>\n<p><strong>Gravity: I2C SD2405 RTC Module<\/strong><\/p>\n<p>The I2C SD2405 RTC module features accurate real-time clock, dual power supply, low power consumption, periodic interrupts, and a high precision time trimming circuit. The SD2405AL is dual power supply system. When the primary power supply goes down to an assigned value or resumes from low power, the system can switch between the primary power supply and battery automatically. Even there is no external power, it can still work for 5~8 years, 1uA ultra-low power consumption.<\/p>\n<p><strong>DL2608Mk05<\/strong><\/p>\n<p>1 x FDFRobot FireBeetle 2 ESP32-E<br \/>\n1 x Fermion: 3.5\u201d 480&#215;320 TFT LCD Capacitive<br \/>\n1 x GDL Line 10 CM<br \/>\n1 x Gravity: GNSS GPS BeiDou Receiver Module<br \/>\n1 x Gravity: I2C SD2405 RTC Module<br \/>\n1 x Gravity: IO Shield for FireBeetle 2<br \/>\n1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT<br \/>\n1 x Lithium Ion Battery &#8211; 1000mAh<br \/>\n1 x USB 3.0 to Type-C Cable<\/p>\n<p><strong>DL2608Mk05p<\/strong><\/p>\n<p><strong>DL2608Mk05p.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 #15: Environment \u2013 GPS and RTC \u2013 Mk48\r\n15-48\r\nDL2608Mk05p.ino\r\nDL2608Mk05\r\n1 x DFRobot FireBeetle 2 ESP32-E\r\n1 x Fermion: 3.5\u201d 480x320 TFT LCD Capacitive\r\n1 x GDL Line 10 CM\r\n1 x Gravity: GNSS GPS BeiDou Receiver Module\r\n1 x Gravity: I2C SD2405 RTC Module\r\n1 x Gravity: IO Shield for FireBeetle 2\r\n1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT\r\n1 x Lithium Ion Battery - 1000mAh\r\n1 x USB 3.0 to Type-C Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ DFRobot Display GDL API\r\n#include &lt;DFRobot_GDL.h&gt;\r\n\/\/ GNSS GPS\r\n#include &lt;DFRobot_GNSS.h&gt;\r\n\/\/ RTC (Real-Time Clock)\r\n#include &quot;GravityRtc.h&quot;\r\n\r\n\/\/ RTC Initialization\r\nGravityRtc rtc;\r\n\/\/ Date and Time\r\nString dateRTC = &quot;&quot;;\r\nString timeRTC = &quot;&quot;;\r\n\r\n\/\/ GNSS GPS\r\n\/\/ Use I2C for communication, but use the serial port for\r\n\/\/ communication if the line of codes were masked\r\n#define I2C_COMMUNICATION\r\n\/\/ ESP32 user hardware uart\r\nDFRobot_GNSS_I2C gnss(&amp;Wire, GNSS_DEVICE_ADDR);\r\nString sDate = &quot;&quot;;\r\nString sUTC = &quot;&quot;;\r\nString sLat = &quot;&quot;;\r\nString sLon = &quot;&quot;;\r\nString sAlt = &quot;&quot;;\r\n\r\n\/\/ Defined ESP32\r\n#define TFT_DC  D2\r\n#define TFT_CS  D6\r\n#define TFT_RST D3\r\n\r\n\/*dc=*\/ \/*cs=*\/ \/*rst=*\/\r\n\/\/ DFRobot Display 320x480\r\nDFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;15-48&quot;;\r\n\r\nvoid loop() {\r\n  \r\n  \/\/ isGNSS\r\n  isGNSS();\r\n\r\n  \/\/ RTC (Real-Time Clock)\r\n  isRTC();\r\n\r\n  \/\/ isDisplay GPS RTC\r\n  isDisplayGPSRTC();\r\n\r\n  \/\/ Delay 1 Second\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\/\/ DFRobot Display 320x480\r\n\/\/ DFRobot Display 320x480 - UID\r\nvoid isDisplayUID(){\r\n\r\n  \/\/ DFRobot Display 320x480\r\n  \/\/ Text Display\r\n  \/\/ Text Wrap\r\n  screen.setTextWrap(false);\r\n  \/\/ Rotation\r\n  screen.setRotation(3);\r\n  \/\/ Fill Screen =&gt; black\r\n  screen.fillScreen(0x0000);\r\n  \/\/ Text Color =&gt; white\r\n  screen.setTextColor(0xffff);\r\n  \/\/ Font =&gt; Free Sans Bold 12pt\r\n  screen.setFont(&amp;FreeSansBold12pt7b);\r\n  \/\/ TextSize =&gt; 1.5\r\n  screen.setTextSize(1.5);\r\n  \/\/ Don Luc Electronics\r\n  screen.setCursor(0, 30);\r\n  screen.println(&quot;Don Luc Electronics&quot;);\r\n  \/\/ Tilt Switch\r\n  screen.setCursor(0, 60);\r\n  screen.println(&quot;GPS and RTC&quot;);\r\n  \/\/ Version\r\n  screen.setCursor(0, 90);\r\n  screen.println(&quot;Version&quot;);\r\n  screen.setCursor(0, 120);\r\n  screen.println( sver );\r\n\r\n}\r\n\/\/ isDisplay GPS RTC\r\nvoid isDisplayGPSRTC(){\r\n\r\n  \/\/ DFRobot Display 320x480\r\n  \/\/ Text Display\r\n  \/\/ Text Wrap\r\n  screen.setTextWrap(false);\r\n  \/\/ Rotation\r\n  screen.setRotation(3);\r\n  \/\/ Fill Screen =&gt; white\r\n  screen.fillScreen(0xffff);\r\n  \/\/ Text Color =&gt; blue\r\n  screen.setTextColor(0x001F);\r\n  \/\/ Font =&gt; Free Sans Bold 12pt\r\n  screen.setFont(&amp;FreeSansBold12pt7b);\r\n  \/\/ TextSize =&gt; 1.5\r\n  screen.setTextSize(1.5);\r\n  \/\/ IP65 Capacitive Soil Moisture Sensor\r\n  screen.setCursor(0, 30);\r\n  screen.println(&quot;GPS and RTC&quot;);\r\n  \/\/ Latitude\r\n  screen.setCursor(0, 70);\r\n  screen.println(&quot;Latitude: &quot;);\r\n  screen.setCursor(170, 70);\r\n  screen.println( sLat );\r\n  \/\/ Longitude\r\n  screen.setCursor(0, 100);\r\n  screen.print(&quot;Longitude: &quot;);\r\n  screen.setCursor(170, 100);\r\n  screen.println( sLon );\r\n  \/\/ GPS Date\r\n  screen.setCursor(0, 130);\r\n  screen.println(&quot;GPS Date: &quot;);\r\n  screen.setCursor(170, 130);\r\n  screen.println( sDate );\r\n  \/\/ GPS Time\r\n  screen.setCursor(0, 160);\r\n  screen.println(&quot;GPS Time: &quot;);\r\n  screen.setCursor(170, 160);\r\n  screen.println( sUTC );\r\n  \/\/ Altitude\r\n  screen.setCursor(0, 190);\r\n  screen.println(&quot;GPS Altitude: &quot;);\r\n  screen.setCursor(170, 190);\r\n  screen.print( sAlt );\r\n  screen.setCursor(290, 190);\r\n  screen.println( &quot;M&quot; );\r\n  \/\/ Date\r\n  screen.setCursor(0, 220);\r\n  screen.println(&quot;Date: &quot;);\r\n  screen.setCursor(170, 220);\r\n  screen.println( dateRTC );\r\n  \/\/ Time\r\n  screen.setCursor(0, 250);\r\n  screen.println(&quot;Time: &quot;);\r\n  screen.setCursor(170, 250);\r\n  screen.println( timeRTC );\r\n  \r\n}\r\n<\/pre>\n<p><strong>getGNSS.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ GNSS\r\n\/\/ isSetupGNSS\r\nvoid isSetupGNSS(){\r\n  \r\n  \/\/ GNSS\r\n  gnss.begin();\r\n  \r\n  \/\/ GNSS\r\n  gnss.enablePower();      \r\n\/** Set the galaxy to be used\r\n *   eGPS              USE gps\r\n *   eBeiDou           USE beidou\r\n *   eGPS_BeiDou       USE gps + beidou\r\n *   eGLONASS          USE glonass\r\n *   eGPS_GLONASS      USE gps + glonass\r\n *   eBeiDou_GLONASS   USE beidou +glonass\r\n *   eGPS_BeiDou_GLONASS USE gps + beidou + glonass\r\n *\/\r\n  gnss.setGnss(eGPS_BeiDou_GLONASS);\r\n  \/\/ GNSS\r\n  \/\/ gnss.setRgbOff();\r\n  gnss.setRgbOn();\r\n  \r\n}\r\n\/\/ isGNSS\r\nvoid isGNSS(){\r\n\r\n  \/\/ GNSS\r\n  sTim_t utc = gnss.getUTC();\r\n  sTim_t date = gnss.getDate();\r\n  sLonLat_t lat = gnss.getLat();\r\n  sLonLat_t lon = gnss.getLon();\r\n  double high = gnss.getAlt();\r\n  \r\n  sDate = &quot;&quot;;\r\n  sUTC = &quot;&quot;;\r\n  sLat = &quot;&quot;;\r\n  sLon = &quot;&quot;;\r\n  sAlt = &quot;&quot;;\r\n  \/\/ Latitude\r\n  sLat = lat.latitudeDegree;\r\n  \/\/ Longitude\r\n  sLon = lon.lonitudeDegree;\r\n  \/\/ Date\r\n  sDate = date.year;\r\n  sDate = sDate + &quot;\/&quot;;\r\n  sDate = sDate + date.month;\r\n  sDate = sDate + &quot;\/&quot;;\r\n  sDate = sDate + date.date;\r\n  \/\/ UTC\r\n  sUTC = utc.hour;\r\n  sUTC = sUTC + &quot;:&quot;;\r\n  sUTC = sUTC + utc.hour;\r\n  sUTC = sUTC + &quot;:&quot;;\r\n  sUTC = sUTC + utc.minute;\r\n  \/\/ Altitude\r\n  sAlt = high;\r\n\r\n}\r\n<\/pre>\n<p><strong>getRTC.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Real-Time Tlock\r\n\/\/ Date and Time RTC\r\nvoid isRTC () {\r\n\r\n  \/\/ Date and Time\r\n  dateRTC = &quot;&quot;;\r\n  timeRTC = &quot;&quot;;\r\n  rtc.read();\r\n  \r\n  \/\/ Date\r\n  dateRTC = rtc.year; \r\n  dateRTC = dateRTC + &quot;\/&quot;;\r\n  dateRTC = dateRTC + rtc.month;\r\n  dateRTC = dateRTC + &quot;\/&quot;;\r\n  dateRTC = dateRTC + rtc.day;\r\n\r\n  \/\/ Time\r\n  timeRTC = rtc.hour;\r\n  timeRTC = timeRTC + &quot;:&quot;;\r\n  timeRTC = timeRTC + rtc.minute;\r\n  timeRTC = timeRTC + &quot;:&quot;;\r\n  timeRTC = timeRTC + rtc.second;\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  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ isSetupGNSS\r\n  isSetupGNSS();\r\n\r\n  \/\/ Delay\r\n  delay(100);\r\n\r\n  \/\/ Setup RTC\r\n  rtc.setup();\r\n\r\n  \/\/Set the RTC time automatically: Calibrate RTC time by your computer time\r\n  rtc.adjustRtc(F(__DATE__), F(__TIME__));\r\n\r\n  \/\/ Delay\r\n  delay(100);\r\n\r\n  \/\/ DFRobot Display 320x480\r\n  screen.begin();\r\n\r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ DFRobot Display 320x480 - UID\r\n  \/\/ Don Luc Electronics\r\n  \/\/ Version\r\n  isDisplayUID();\r\n\r\n  \/\/ Wait for the sensor to heat up for 20 seconds\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>Consultant, R&#038;D, Electronics, IoT, Teacher and Instructor<\/strong><\/p>\n<ul>\n<li>Programming Language<\/li>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Wireless (Radio Frequency, Bluetooth, WiFi, Etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Automation<\/li>\n<li>Camera and Video Capture Receiver Stationary, Wheel\/Tank , Underwater and UAV Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial,  Marine and UAV<\/li>\n<li>Machine Learning<\/li>\n<li>Artificial Intelligence (AI)<\/li>\n<li>RTOS<\/li>\n<li>Sensors, eHealth Sensors, Biosensor, and Biometric<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Consulting<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Luc Paquin \u2013 Curriculum Vitae &#8211; 2026<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/LucPaquinCVEng2026Mk01.pdf<br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.jlpconsultants.com\/<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/@thesass2063<br \/>\n<strong>DFRobot:<\/strong> https:\/\/learn.dfrobot.com\/user-10186.html<br \/>\n<strong>TikTok:<\/strong> https:\/\/www.tiktok.com\/@luc.paquin8<br \/>\n<strong>Hackster:<\/strong> https:\/\/www.hackster.io\/luc-paquin<br \/>\n<strong>LinkedIn:<\/strong> https:\/\/www.linkedin.com\/in\/jlucpaquin\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc #GPS #RTC #Environment #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212;- &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Gravity: GNSS GPS BeiDou Receiver Module The GNSS receiver module supports multiple satellite systems for accurate, high-speed positioning in various environments. It&#8217;s compatible with I2C\/UART devices. GNSS stands for Global Navigation Satellite System. The main &#8230; <a title=\"Project #15: Environment \u2013 GPS and RTC \u2013 Mk48\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=4952\" aria-label=\"Read more about Project #15: Environment \u2013 GPS and RTC \u2013 Mk48\">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":[106,397,50,49,317,38,80,59,115,5,287,58,82,10],"tags":[6,92,102,4,320,87,19,107,83,85,434,24,9,84,27,248,33,34,108],"class_list":["post-4952","post","type-post","status-publish","format-standard","hentry","category-environment","category-arduino-digitalelectronics","category-arduino","category-consultant","category-dfrobot","category-digitalelectronics","category-esp32","category-fritzing","category-e-mentor","category-microcontrollers","category-program","category-arduino-programming","category-program-esp32","category-projects","tag-arduino","tag-battery","tag-components","tag-consultant","tag-dfrobot","tag-display","tag-electronics","tag-environment","tag-esp32","tag-fritzing","tag-gps-and-rtc","tag-microcontroller","tag-programming","tag-programming-esp32","tag-projects-2","tag-sensors","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4952","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=4952"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4952\/revisions"}],"predecessor-version":[{"id":4957,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4952\/revisions\/4957"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}