I made a Reverse Geocache Box based off of Mikal Hart’s design (http://archive.makezine.com/25/puzzlebox/) for an electronics course at my school. I also based my design off of Tyler Cooper’s Adafruit guide (http://learn.adafruit.com/reverse-geocache-engagement-box/overview) since we both used an Adafruit Ultimate GPS receiver.
I’m having an issue serially transmitting the GPS data from the GPS reciever to the TinyGPS library that processes the data to calculate the distance that the box is from its destination coordinates. It seems that the speed (baud rate?) of the serial data transmission on the “send” end is too slow so the tinygps.encode() function doesn’t recognize any complete data sentences, which is required in order to determine the GPS receiver’s latitude and longitude. Attached is my code, I’ve changed the destination coordinates to the Empire State Building in order to hide my real location. I would like the tinygps.encode() function to determine distance (in meters) between the box and its destination coordinates so this data can be displayed on the LCD for the user. Everything else with the box such as the servo, the pushbutton, sleep mode, etc. seems to work great.
Also, I am still sort of a beginner at writing code so please go easy on me. There are likely easier ways to do what I’m trying to do.
ReverseGeocacheBoxForum.ino (9.22 KB)