Note: The time between seeing satellites and actually getting a lock is dependent on the satellite. Be in view of the open sky for best results (and even then it may take a while to get a lock). Once the module has a lock, the lock should stay for a while.
Make a directory inside your “tessel-code” folder called “gps”, change directory into that folder, and initialize a tessel project:
mkdir gps; cd gps; t2 init
Plug the GPS module into Tessel port A with the hexagon/icon side down and the electrical components on the top, then plug Tessel into your computer via USB.
Install by typing npm install gps-a2235h
into the command line.
Rename “index.js” to “gps.js” and replace the file’s contents with the following:
Save the file.
In your command line, t2 run gps.js
Check out your location! If you’re having trouble getting a location fix, try going outside; you probably don’t have satellites indoors.
Bonus: Set up a geofence so that you are inside it. (Hint: you may need to check the documentation.)
To see what else you can do with the GPS module, see the module docs here.
What else can you do with a GPS module? Try a community-created project.
What are you making? Share your invention!
If you run into any issues you can check out the gps forums.