{"id":3749,"date":"2023-11-25T08:07:35","date_gmt":"2023-11-25T16:07:35","guid":{"rendered":"https:\/\/www.donluc.com\/?p=3749"},"modified":"2023-11-25T08:07:35","modified_gmt":"2023-11-25T16:07:35","slug":"project-28-sensors-gps-receiver-gp-20u7-mk10","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=3749","title":{"rendered":"Project #28 &#8211; Sensors &#8211; GPS Receiver GP-20U7 &#8211; Mk10"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-3749-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #Sensors #GPSReceiver #Adafruit #SparkFun #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04a.png\" alt=\"GPS Receiver GP-20U7\" width=\"720\" height=\"554\" class=\"alignnone size-full wp-image-3751\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04a-300x231.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\/2023\/11\/DL2309Mk04b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04b.png\" alt=\"GPS Receiver GP-20U7\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-3752\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04b-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\/2023\/11\/DL2309Mk04c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04c.png\" alt=\"GPS Receiver GP-20U7\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-3753\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2023\/11\/DL2309Mk04c-300x200.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>GPS Receiver &#8211; GP-20U7<\/strong><\/p>\n<p>The GP-20U7 is a compact GPS receiver with a built-in high performances All-In-One GPS chipset. The GP-20U7 accurately provides position, velocity, and time readings as well possessing high sensitivity and tracking capabilities. Thanks to the low power consumption this receiver requires, the GP-20U7 is ideal for portable applications such as tablet PCs, smart phones, and other devices requiring positioning capability. This 56-Channel GPS module, that supports a standard NMEA-0183 and uBlox 7 protocol, has low power consumption of 40mA@3.3V (max), an antenna on board, and -162dBm tracking sensitivity. With 56 channels in search mode and 22 channels &#8220;All-In-View&#8221; tracking, the GP-20U7 is quite the work horse for its size.<\/p>\n<p><strong>DL2309Mk04<\/strong><\/p>\n<p>1 x Fio v3 &#8211; ATmega32U4<br \/>\n1 x DS3231 Precision RTC FeatherWing<br \/>\n1 x GPS Receiver &#8211; GP-20U7 (56 Channel)<br \/>\n1 x Rocker Switch &#8211; SPST<br \/>\n1 x Resistor 10K Ohm<br \/>\n1 x CR1220 3V Lithium Coin Cell Battery<br \/>\n1 x SparkFun Cerberus USB Cable<\/p>\n<p><strong>Fio v3 &#8211; ATmega32U4<\/strong><\/p>\n<p>LED &#8211; LED_BUILTIN<br \/>\nSDA &#8211; Digital 2<br \/>\nSCL &#8211; Digital 3<br \/>\nSW1 &#8211; Digital 6<br \/>\nGPT &#8211; Digital 7<br \/>\nGPR &#8211; Digital 9<br \/>\nVIN &#8211; +3.3V<br \/>\nGND &#8211; GND<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>DL2309Mk04p.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 #28 - Sensors - GPS Receiver GP-20U7 - Mk10\r\n28-10\r\nDL2309Mk04p.ino\r\n1 x Fio v3 - ATmega32U4\r\n1 x DS3231 Precision RTC FeatherWing\r\n1 x GPS Receiver - GP-20U7 (56 Channel)\r\n1 x Rocker Switch - SPST\r\n1 x Resistor 10K Ohm\r\n1 x CR1220 3V Lithium Coin Cell Battery\r\n1 x SparkFun Cerberus USB Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ DS3231 Precision RTC \r\n#include &lt;RTClib.h&gt;\r\n\/\/ Two Wire Interface (TWI\/I2C)\r\n#include &lt;Wire.h&gt;\r\n\/\/ Keyboard\r\n#include &lt;Keyboard.h&gt;\r\n\/\/ GPS Receiver\r\n#include &lt;TinyGPS++.h&gt;\r\n\/\/ Software Serial\r\n#include &lt;SoftwareSerial.h&gt;\r\n\r\n\/\/ Keyboard\r\nString sKeyboard = &quot;&quot;;\r\n\r\n\/\/ DS3231 Precision RTC \r\nRTC_DS3231 rtc;\r\nString dateRTC = &quot;&quot;;\r\nString timeRTC = &quot;&quot;;\r\n\r\n\/\/ GPS Receiver\r\n#define gpsRXPIN 9\r\n\/\/ This one is unused and doesnt have a conection\r\n#define gpsTXPIN 7\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\r\n\/\/ GPS Date\r\nString TargetDat;\r\n\/\/ GPS Time\r\nString TargetTim;\r\n\/\/ GPS Status\r\nString GPSSt = &quot;&quot;;\r\n\r\n\/\/ The serial connection to the GPS device\r\nSoftwareSerial tGPS(gpsRXPIN, gpsTXPIN);\r\n\r\n\/\/ The number of the Rocker Switch pin\r\nint iSwitch = 6;\r\n\/\/ Variable for reading the button status\r\nint SwitchState = 0;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;28-10&quot;;\r\n\r\nvoid loop() {\r\n\r\n  \/\/ Date and Time RTC\r\n  isRTC ();\r\n\r\n  \/\/ isGPS\r\n  isGPS();\r\n\r\n  \/\/ GPS Keyboard\r\n  isGPSKeyboard();\r\n\r\n  \/\/ Read the state of the Switch value:\r\n  SwitchState = digitalRead(iSwitch);\r\n\r\n  \/\/ Check if the button is pressed. If it is, the SwitchState is HIGH:\r\n  if (SwitchState == HIGH) {\r\n\r\n     Keyboard.println(sKeyboard);\r\n    \r\n  }\r\n\r\n  \/\/ Delay 1 Second\r\n  delay(1000);\r\n\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 );\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\r\n       \/\/ GPS Date, Time\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     TargetLat = 0;\r\n     TargetLon = 0;\r\n    \r\n  }\r\n\r\n  \r\n\r\n}\r\n\/\/ GPS Date, Time\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}\r\n\/\/ GPS Keyboard\r\nvoid isGPSKeyboard(){\r\n\r\n  \/\/ GPS Keyboard\r\n  \/\/ Keyboard\r\n  \/\/ GPS Vector Pointer Target\r\n  sKeyboard = sKeyboard + GPSSt + &quot;|&quot; + String(TargetLat) \r\n  + &quot;|&quot; + String(TargetLon) + &quot;|&quot;;\r\n\r\n  \/\/ Keyboard\r\n  \/\/ GPS Date, Time\r\n  sKeyboard = sKeyboard + TargetDat + &quot;|&quot; + \r\n  TargetTim + &quot;|*&quot;;\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\/\/ Date &amp; Time\r\n\/\/ DS3231 Precision RTC\r\nvoid setupRTC() {\r\n\r\n  \/\/ DS3231 Precision RTC\r\n  if (! rtc.begin()) {\r\n    \/\/Serial.println(&quot;Couldn&#039;t find RTC&quot;);\r\n    \/\/Serial.flush();\r\n    while (1) delay(10);\r\n  }\r\n\r\n  if (rtc.lostPower()) {\r\n    \/\/Serial.println(&quot;RTC lost power, let&#039;s set the time!&quot;);\r\n    \/\/ When time needs to be set on a new device, or after a power loss, the\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    \/\/ January 21, 2014 at 3am you would call:\r\n    \/\/rtc.adjust(DateTime(2023, 8, 10, 11, 0, 0));\r\n  }\r\n  \r\n}\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  DateTime now = rtc.now();\r\n  \r\n  \/\/ Date\r\n  dateRTC = now.year(), DEC; \r\n  dateRTC = dateRTC + &quot;\/&quot;;\r\n  dateRTC = dateRTC + now.month(), DEC;\r\n  dateRTC = dateRTC + &quot;\/&quot;;\r\n  dateRTC = dateRTC + now.day(), DEC;\r\n\r\n  \/\/ Time\r\n  timeRTC = now.hour(), DEC;\r\n  timeRTC = timeRTC + &quot;:&quot;;\r\n  timeRTC = timeRTC + now.minute(), DEC;\r\n  timeRTC = timeRTC + &quot;:&quot;;\r\n  timeRTC = timeRTC + now.second(), DEC;\r\n\r\n  \/\/ Keyboard\r\n  sKeyboard = &quot;SEN|&quot; + sver + &quot;|&quot; + String(dateRTC) + &quot;|&quot; + \r\n  String(timeRTC) + &quot;|&quot;;\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  \/\/ Wire - Inialize I2C Hardware\r\n  Wire.begin();\r\n\r\n  \/\/ Give display time to power on\r\n  delay(100);\r\n\r\n  \/\/ Date &amp; Time RTC\r\n  \/\/ DS3231 Precision RTC \r\n  setupRTC();\r\n  \r\n  \/\/ Initialize control over the keyboard:\r\n  Keyboard.begin();\r\n\r\n  \/\/ Give display time to power on\r\n  delay(100);\r\n  \r\n  \/\/ GPS Receiver\r\n  \/\/ Setup GPS\r\n  setupGPS();\r\n\r\n  \/\/ Initialize the Switch pin as an input\r\n  pinMode(iSwitch, INPUT);\r\n\r\n  \/\/ Initialize digital pin LED_BUILTIN as an output\r\n  pinMode(LED_BUILTIN, OUTPUT);\r\n  \/\/ Turn the LED on HIGH\r\n  digitalWrite(LED_BUILTIN, HIGH);\r\n\r\n  \/\/ Delay 5 Second\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>Programming Language<\/li>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Wireless (Radio Frequency, Bluetooth, WiFi, Etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Camera and Video Capture Receiver Stationary, Wheel\/Tank and Underwater Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial and Marine<\/li>\n<li>Machine Learning<\/li>\n<li>RTOS<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<\/ul>\n<p><strong>Instructor, E-Mentor, STEAM, and Arts-Based Training<\/strong><\/p>\n<ul>\n<li>Programming Language<\/li>\n<li>IoT<\/li>\n<li>PIC Microcontrollers<\/li>\n<li>Arduino<\/li>\n<li>Raspberry Pi<\/li>\n<li>Espressif<\/li>\n<li>Robotics<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Luc Paquin \u2013 Curriculum Vitae &#8211; 2023<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.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>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 #Sensors #GPSReceiver #Adafruit #SparkFun #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; GPS Receiver &#8211; GP-20U7 The GP-20U7 is a compact GPS receiver with a built-in high performances All-In-One GPS chipset. The GP-20U7 accurately provides position, velocity, and time readings as well possessing high sensitivity and tracking capabilities. Thanks &#8230; <a title=\"Project #28 &#8211; Sensors &#8211; GPS Receiver GP-20U7 &#8211; Mk10\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=3749\" aria-label=\"Read more about Project #28 &#8211; Sensors &#8211; GPS Receiver GP-20U7 &#8211; Mk10\">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":[294,47,50,49,38,59,5,287,58,10,43],"tags":[86,6,102,4,19,85,89,308,24,9,27,248,109,33,34,108],"class_list":["post-3749","post","type-post","status-publish","format-standard","hentry","category-sensors","category-adafruit","category-arduino","category-consultant","category-digitalelectronics","category-fritzing","category-microcontrollers","category-program","category-arduino-programming","category-projects","category-sparkfun","tag-adafruit","tag-arduino","tag-components","tag-consultant","tag-electronics","tag-fritzing","tag-gps-receiver","tag-gps-receiver-gp-20u7","tag-microcontroller","tag-programming","tag-projects-2","tag-sensors","tag-sparkfun","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/3749","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=3749"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/3749\/revisions"}],"predecessor-version":[{"id":3754,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/3749\/revisions\/3754"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}