Using Your Coobro Geo
Once you have your Coobro Geo built, you will need to install the firmware onto the processor. The Atmega328 chip already has the Arduino bootloader on it, so we just need to hook up your FTDI cable and install the Arduino Sketch. In order to go any further, you will need to have an FTDI cable or breakout board. We recommend that you buy the 3.3V variety of FTDI cables or breakout boards. You can buy these from Adafruit or Sparkfun.
Next, we will want to download the latest Arduino sketch. Click here to download the sketch from Github. Our sketch does not currently work on Arduino v1.0. Make sure to use Arduino 0022 or 0023.
You will download a .ZIP file called ‘coobro-geo-bb16d48′. Go ahead and extract everything to your desktop. Then, change the name of the folder from ‘coobro-geo-bb16d48′ to ‘CoobroGeo’. Now, move this folder to wherever you keep your Arduino sketches. Once again, if you don’t know where your Arduino sketch folder is, go back up and click on the link for your operating system to learn where these folders are located on your computer.
You will also need to install two libraries. The TinyGPS library, and the NewSoftSerial library (both created by Mikal Hart). If you would like to learn more about libraries, please read Ladyada’s great tutorial by clicking here.
Once you have both libraries installed, we need to make a slight modification to the NewSoftSerial library. We need to increase the buffer size from 64 to 128 or 256. Open up the NewSoftSerial library folder and open the NewSoftSerial.h file with your text editor. Right up near the top of the document, you will see this line:
#define _NewSS_MAX_RX_BUFF 64 // RX buffer size
And change that line to:
#define _NewSS_MAX_RX_BUFF 128 // RX buffer size
Save and close the file, then go ahead and open up the CoobroGeo sketch in the Arduino IDE.
Towards the top of the sketch you will see this section.
//--------------------------------------------------| // WAYPOINTS | //--------------------------------------------------| //Please enter the latitude and longitude of your | //desired destinations: | #define GEO_LAT1 40.709971 #define GEO_LON1 -74.007976 #define GEO_LAT2 40.064287 #define GEO_LON2 -105.210604 #define GEO_LAT3 51.178418 #define GEO_LON3 -1.826370 #define GEO_LAT4 46.234020 #define GEO_LON4 6.052672 #define GEO_LAT5 37.2368 #define GEO_LON5 -115.8102 //--------------------------------------------------|
These are the coordinates you will want to change. If you are going to go geocache hunting, you would put the latitude and longitude coordinates of the cache. We can store five waypoint locations here.
The best way to find the latitude and longitude of geocache locations is to find them in a .LOC file. Lets go to geocaching.com to find these files. Geocaching.com is a site that you must register for in order to find geocache locations. Go ahead and register if you don’t already have an account.
From the homepage, we want to go to the Hide & Seek a Cache page. From there, I find it easiest to use their neat Google Maps view to search out caches. Look at the arrow at the lower right of the screenshot below. Click on the search with Google Maps link.
Once you get to the maps page, in the search bar on the upper left, enter the zip code of the general location you want to find caches in and press enter. Move the map around, and zoom in to where you want to search for a cache. Give the map a few moments to load the geocaches in that area. Look at the example below. What you want to do is click on the cache image, and it will popup some info on that cache. It will tell you difficulty, and terrain, as well as the size of the cache. Next, click on the title of the cache (Friday Night Lights in the example below).
This will open a new page with some detailed information about the geocache. It is usually a good idea to read the comments portion of this page to make sure the geocache is still active and has been found recently. Those pesky Muggles like to steal our geocaches. Now, click the link labeled LOC waypoint file.
The LOC file will automatically download to your downloads folder. Find the file called geocaching.loc and open it up. Look at the example below, I have highlighted the coordinates we are looking for. These are the numbers we will dump into the Arduino sketch.
Now, go back to the sketch and place these coordinates in one of the five waypoint slots. I will put it in the top spot below. Don’t forget to include the ‘-’ if it is shown in your file.
//--------------------------------------------------| // WAYPOINTS | //--------------------------------------------------| //Please enter the latitude and longitude of your | //desired destinations: | #define GEO_LAT1 44.91755 #define GEO_LON1 -93.2086333333333 #define GEO_LAT2 40.064287 #define GEO_LON2 -105.210604 #define GEO_LAT3 51.178418 #define GEO_LON3 -1.826370 #define GEO_LAT4 46.234020 #define GEO_LON4 6.052672 #define GEO_LAT5 37.2368 #define GEO_LON5 -115.8102 //--------------------------------------------------|
You can stop here, or repeat and enter up to five geocache locations into the sketch. If you are going to use less than the 5 spots, make sure to leave the examples in the remaining slots. Now we need to upload the sketch. Make sure to insert the FTDI cable or breakout board in the right way with the green wire towards the back of the Coobro Geo.
Make sure to select the correct COM port, and more importantly, select the correct board. Make sure to select Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328.
Upload the sketch to your Coobro Geo. If an error pops up for some reason, try uploading it again. Once it says upload successful, it is time to try it out. When you first turn it on, make sure you have the power select (PWR SEL) jumper on the left side in the BAT position. Also, switch the right switch to GEO. While standing outside with open sky, the direction LEDs will start scanning from left to right while the Coobro Geo tries to lock onto satellites. The first time you do this, it can take awhile so be patient. It should take less than a couple minutes from here on out (until you replace the batteries).
Once it locks onto the satellites, the direction LEDs will switch off, and the left (START) distance LED will switch on. When the direction LEDs are off, and the distance LEDs are on, you are in menu mode. This is where you will set which waypoint you would like to go to first. You can use the SET LOC pushbutton to toggle between them.
When you are happy with your selection, let the Geo sit for a couple seconds and it will go into navigate mode. You know when you are in navigate mode when an LED from the direction and distance LEDs are lit up. In order to accurately get a proper directional heading, you need to start walking. The code will look at where you are, and where you just were and do some math to determine which direction you are heading in. It will then do some math to figure out what direction you need to go and turn on the LED in that direction. If you see the far right and far left directional LEDs light up, that means you need to turn around.
The distance LEDs work by determining where you are when you go into navigation mode, and how far away the next waypoint is. It then takes that value, splits it up into 5 parts, one for each LED. As you walk, the LED will shift over towards the FINISH side. When you are 5 meters away, all five LEDs will light up. When you are four meters away, the right four LEDs will light up. The GPS module should be accurate within a couple meters, so once you get it down to three LEDs lit up, you should start searching for the geocache.
There is another very useful mode called Breadcrumbs. This allows you to store coordinates in the Atmega328′s EEPROM. So, you even if you turn off the Coobro Geo, these coordinates will be preserved. Once you have locked satellites, switch the BC|GEO switch to BC (for breadcrumbs). You will instantly go into menu mode. Press the SET LOC button until you select the breadcrumbs coordinate you would like to record (I selected the middle LED on the image below). Then press and hold the SET LOC button. The direction LEDs will start to light up from left to right. Once all nine LEDs are lit up, the distance LED that you selected will blink a few times letting you know that the coordinate has been saved.
Go ahead and flip it back to GEO mode, and navigate to your next coordinate. When you want to find your way back to the breadcrumbs coordinate, switch back to BC, then select the LED that you saved that BC under. Let it sit for a second to get it back into navigation mode, and it will navigate you back to that coordinate. Don’t forget, you have to keep moving to get a proper direction. Also, the direction LED may jump around from time to time, but just stay on course and it will fix itself.
Use the breadcrumbs to record the hot fishing holes, or to remember how to get back to the parking lot before you head out on a hike.
Thats it! Happy exploring!
If you need any more assistance, please use the Coobro Geo Support Forum by clicking the Coobro Geo Support link to the right.