{"id":159,"date":"2019-09-01T18:53:38","date_gmt":"2019-09-01T18:53:38","guid":{"rendered":"http:\/\/www.danibeltra.com\/?p=159"},"modified":"2019-09-03T14:00:14","modified_gmt":"2019-09-03T14:00:14","slug":"obtencion-de-datos-gps-con-la-tarjeta-itead-gps-shield-1-1-y-arduino-mkr-gsm-1400","status":"publish","type":"post","link":"https:\/\/www.danibeltra.com\/?p=159","title":{"rendered":"Obtenci\u00f3n de datos GPS con la tarjeta ITEAD GPS Shield 1.1 y Arduino MKR GSM 1400."},"content":{"rendered":"<div class=\"d01b6de6d841a687c79c6c1b0fb3f31f\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({\r\n          google_ad_client: \"ca-pub-0255821013702972\",\r\n          enable_page_level_ads: true\r\n     });\r\n<\/script>\n<\/div>\n\n<p><strong>Materiales utilizados:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.itead.cc\/wiki\/Arduino_GPS_shield\">Itead Studio GPS Shield 1.1<\/a><\/li><li><a href=\"https:\/\/store.arduino.cc\/mega-2560-r3\"><\/a><a href=\"https:\/\/store.arduino.cc\/mkr-gsm-1400\">Arduino MKR GSM 1400<\/a><\/li><\/ul>\n\n\n\n<p><strong>Conexionado:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"971\" src=\"https:\/\/www.danibeltra.com\/wp-content\/uploads\/2019\/09\/Mkr1400gpsshield-1-1024x971.png\" alt=\"\" class=\"wp-image-169\" srcset=\"https:\/\/www.danibeltra.com\/wp-content\/uploads\/2019\/09\/Mkr1400gpsshield-1-1024x971.png 1024w, https:\/\/www.danibeltra.com\/wp-content\/uploads\/2019\/09\/Mkr1400gpsshield-1-300x284.png 300w, https:\/\/www.danibeltra.com\/wp-content\/uploads\/2019\/09\/Mkr1400gpsshield-1-768x728.png 768w, https:\/\/www.danibeltra.com\/wp-content\/uploads\/2019\/09\/Mkr1400gpsshield-1.png 1155w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Descripci\u00f3n de la aplicaci\u00f3n:<\/strong><\/p>\n\n\n\n<p> En cierta aplicaci\u00f3n, necesito ver por el monitor serie del IDE de Arduino la recepci\u00f3n de datos de la ITEAD GPS Shield 1.1, para ello, realizo el cableado seg\u00fan indico en la imagen. En este caso la tarjeta GPS ha de estar configurada a 3.3v, ya que el MKR 1400 trabaja a este voltaje.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;TinyGPS.h>\n\nTinyGPS gps;\n\nvoid setup()\n{\n  Serial.begin(115200);\n  Serial1.begin(9600);\n}\n\nvoid loop()\n{\n  \n  bool newData = false;\n  unsigned long chars;\n  unsigned short sentences, failed;\n\n  \/\/ For one second we parse GPS data and report some key values\n  for (unsigned long start = millis(); millis() - start &lt; 1000;)\n  {\n    while (Serial1.available())\n    {\n      char c = Serial1.read();\n      if (gps.encode(c)) \/\/ Did a new valid sentence come in?\n        newData = true;\n    }\n  }\n\n  if (newData)\n  {\n    while (!Serial1) ; \n    float flat, flon;\n    unsigned long age;\n    gps.f_get_position(&amp;flat, &amp;flon, &amp;age);\n    Serial.print(\"Latitud=\");\n    Serial.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);\n    Serial.print(\" Longitud=\");\n    Serial.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);\n    Serial.print(\" Satelites recibidos=\");\n    Serial.print(gps.satellites() == TinyGPS::GPS_INVALID_SATELLITES ? 0 : gps.satellites());\n    Serial.print(\" Precision=\");\n    Serial.print(gps.hdop() == TinyGPS::GPS_INVALID_HDOP ? 0 : gps.hdop());\n  }\n  \n  gps.stats(&amp;chars, &amp;sentences, &amp;failed);\n  Serial.print(\" Caracteres Recibidos=\");\n  Serial.print(chars);\n  Serial.print(\" Sentencias=\");\n  Serial.print(sentences);\n  Serial.print(\" CSUM ERR=\");\n  Serial.println(failed);\n  if (chars == 0)\n    Serial.println(\"** No characters received from GPS: check wiring **\");\n}<\/code><\/pre>\n\n\n\n<div class=\"wp-block-file aligncenter\"><a href=\"https:\/\/www.danibeltra.com\/wp-content\/uploads\/2019\/09\/simple_testDani.zip\">Fichero del ejemplo:<\/a><a href=\"https:\/\/www.danibeltra.com\/wp-content\/uploads\/2019\/09\/simple_testDani.zip\" class=\"wp-block-file__button\" download>Descarga<\/a><\/div>\n<!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Materiales utilizados: Itead Studio GPS Shield 1.1 Arduino MKR GSM 1400 Conexionado: Descripci\u00f3n de la aplicaci\u00f3n: En cierta aplicaci\u00f3n, necesito ver por el monitor serie del IDE de Arduino la recepci\u00f3n de datos de la ITEAD GPS Shield 1.1, para ello, realizo el cableado seg\u00fan indico en la imagen. En este caso la tarjeta GPS &hellip; <a href=\"https:\/\/www.danibeltra.com\/?p=159\" class=\"more-link\">Sigue leyendo <span class=\"screen-reader-text\">Obtenci\u00f3n de datos GPS con la tarjeta ITEAD GPS Shield 1.1 y Arduino MKR GSM 1400.<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":"","footnotes":""},"categories":[6,47,55,17],"tags":[],"class_list":["post-159","post","type-post","status-publish","format-standard","hentry","category-arduino","category-cableado","category-gps","category-programacion"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=\/wp\/v2\/posts\/159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=159"}],"version-history":[{"count":10,"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":173,"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions\/173"}],"wp:attachment":[{"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.danibeltra.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}