Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the updraftplus domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home1/wyolum/public_html/wp-includes/functions.php on line 6114

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893
{"id":925,"date":"2012-08-12T17:02:54","date_gmt":"2012-08-12T21:02:54","guid":{"rendered":"https:\/\/wyolum.com\/?p=925"},"modified":"2012-08-12T20:59:04","modified_gmt":"2012-08-13T00:59:04","slug":"gps-over-i2c","status":"publish","type":"post","link":"https:\/\/wyolum.com\/gps-over-i2c\/","title":{"rendered":"GPS over I2C!"},"content":{"rendered":"

\"\"<\/a><\/p>\n


\n<\/a>We’ve written a simple I2C interface for
I2GPS<\/a>\u00a0(available for sale\u00a0here<\/a>). If you’ve ever combined GPS to Arduino you have probably used TinyGPS<\/a> by Mikal Hart. \u00a0We use it too and we love it.<\/p>\n

When you want to incorporate GPS into a larger project a couple of issues arise that I2GPS solves. \u00a0The first issue is that the GPS object must constantly be “fed” new data. \u00a0This leads to ubiquitous calls to gps.feed() throughout the code. \u00a0If you have other time critical functions (like updating an LED matrix), the juggling of tasks can get overly complex. \u00a0The second is the size of the code can cramp the size of your main program. \u00a0We ran into both of these problems with ClockTHREEjr.<\/p>\n

I2GPS solves these problems with by offloading the memory and processing burden to a second processor. \u00a0The I2GPS slave code needs only to read the GPS, and respond to I2C requests to data.<\/p>\n

I’ve modeled the interface<\/a> after the DS3231, the real time clock included with I2GPS, the same clock as the Chronodot<\/a> from Macetech. \u00a0So from the client side, things look a lot like reading the Chronodot. \u00a0Here is a snippet of client code<\/a>\u00a0(not updated). \u00a0The DS3231 is still available though the I2C interface.<\/p>\n

\/\/ read 32 bytes from address 0, store in \"gps_data\" byte array\r\n  gps_raw_read((uint8_t)0, (uint8_t)32, gps_data);\r\n\r\n\/\/ Parse response\r\n  Serial.print(\"UNIX TIME:\");\r\n  Serial.println(unserialize_ulong(gps_data+0));\r\n  Serial.print(\"LAT:\");\r\n  Serial.print(unserialize_long(gps_data+4));\r\n  Serial.println(\" 1\/1000th DEG\");\r\n  Serial.print(\"LON:\");\r\n  Serial.print(unserialize_long(gps_data+8));\r\n  Serial.println(\" 1\/1000th DEG\");\r\n  Serial.print(\"ALT:\");\r\n  Serial.print(unserialize_long(gps_data+12));\r\n  Serial.println(\" CM\");<\/pre>\n

Wall clock time is also available starting at address 0x1C.<\/p>\n

gps_raw_read(0x1C, 6, ymdhms);\r\n\r\nSerial.print(\"CALENDAR TIME:\");\r\nSerial.print(ymdhms[1], DEC); \/\/ Month\r\nSerial.print(\"\/\");       \r\nSerial.print(ymdhms[2], DEC); \/\/ Day\r\nSerial.print(\"\/\");\r\nSerial.print(ymdhms[0], DEC); \/\/ Year\r\n\r\nSerial.print(\" \");\r\nSerial.print(ymdhms[3], DEC); \/\/ Hour\r\nSerial.print(\":\");\r\nSerial.print(ymdhms[4], DEC); \/\/ Minute\r\nSerial.print(\":\");\r\nSerial.print(ymdhms[5], DEC); \/\/ Second\r\nSerial.println(\"\");<\/pre>\n
<\/pre>\n
\"\"<\/a>

The I2GPS has several physical interface options. Shown above is the “Buckler” (small shield) interface that plugs directly into the analog side of the Arduino.<\/p><\/div>\n

The complete data structure memory map is available as a google spreadsheet<\/a> (for the latest)\u00a0or below in static html. \u00a0I’ve put a couple of field to log the state of analog and digital pins, but supporting code has not been\u00a0implemented\u00a0yet. \u00a0Available data include: unix time (and wall clock time), latitude, longitude, altitude, course, speed, fix age.<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

We’ve written a simple I2C interface for I2GPS\u00a0(available for sale\u00a0here). If you’ve ever combined GPS to Arduino you have probably used TinyGPS by Mikal Hart. \u00a0We use it too and we love it. When you want to incorporate GPS into … Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-925","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/posts\/925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/comments?post=925"}],"version-history":[{"count":6,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/posts\/925\/revisions"}],"predecessor-version":[{"id":931,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/posts\/925\/revisions\/931"}],"wp:attachment":[{"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/media?parent=925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/categories?post=925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/tags?post=925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}