Pages: [1]   Go Down
Author Topic: Dog Personality Extender (GPS + Wave Shield Questions)  (Read 531 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm nearing the end of the semester for my Sensor Based Art class for graduate studies using primarily Arduino equipment, breadboards, etc. so I'm fairly new to doing this, but have had recent experience.

I am focusing on building a vest for my dog to wear that will log GPS cooardinates, and based off if the dog has been in an area before (ie. back at a location already logged within the GPS data log), will speak "I've been here" or "I haven't been here".

I am currently trying to use a GPS Shield on one Arduino Duemilanove and a Wave Sheild on another Arduino Duemilanove.

I am not good at writing programs, but know how it works when I look at a functioning piece of code.

Here's a not so great way of how I want it to work

Quote
GPS Arduino

When Dog is Somewhere
 {
    If ( dog is in same general area as a previous data log then ) {
      Output True or HIGH
      }
    Else {
      Output False or LOW
      Log Location
      }
}

Wave Arduino

If (True Signal from GPS Arduino ) {
      Play "I've been Here" wav
      }
If (False Signal from GPS Arduino ) {
      Play "I have not been Here" wav
      }


thats the general way I want it to work or think it would work easiest. I am primarily confused what code would work to log, then check the log. Sending a High or Low signal is pretty simple, the rest (primarily all the GPS stuff) is semi confusing.

note: I'm using two Arduinos due to noted conflicts between the libraries of the GPS and Wave Shields.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 644
Posts: 50452
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There a number of questions that you didn't answer. For instance, where are you recording where the GPS has been? How are the two Arduinos communicating? What is the criteria for "I've been here before"? The exact same lat/lon value, or some threshold? How big? 10 feet? 10 miles?

Do you know how to read data from the GPS? How is it connected to the Arduino? Which pins does it use?

Do you know how to make the Wave shield play a file?

Quote
I'm using two Arduinos due to noted conflicts between the libraries of the GPS and Wave Shields.
Noted by whom?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There a number of questions that you didn't answer. For instance, where are you recording where the GPS has been? How are the two Arduinos communicating? What is the criteria for "I've been here before"? The exact same lat/lon value, or some threshold? How big? 10 feet? 10 miles?

I'm recording where the GPS has been before onto an 2gb SD card into a text file. The two Arduinos would most likely connect via a simple connection of pins sending digital out and digital in signals (basically an on or off state). The criteria for "I've been here before" is in a threshold of an area, which is more close to 10 feet, or even 5 feet if possible.

Quote
Do you know how to read data from the GPS? How is it connected to the Arduino? Which pins does it use?

I have yet to look exactly at how to read GPS data, but I built the shield for it and ran the example code and it is functioning perfectly. I have yet to be able to check which pins are open/used, though I only need one open for a digital out.

Quote
Do you know how to make the Wave shield play a file?

I've used the example code and reprogrammed a few of the examples with them working (though I am having trouble with one which is working initially, but not playing later). The wave shield is honestly the easiest part of this whole thing, the GPS is the hard part for me.

Quote
Quote
I'm using two Arduinos due to noted conflicts between the libraries of the GPS and Wave Shields.
Noted by whom?

I can't find the link right now >_< Basically someone else trying to use both shields had conflicts with the libraries as well as the pins used.

Any help is appreciated so thanks so far  smiley-surprise
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 644
Posts: 50452
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a library, TinyGPS that parses the most common GPS output formats, extracting time, lat, long, speed, etc. Comparing a given lat/lon pair with another lat/lon pair is not too difficult (though not exactly trivial, since the distance is not a straight line between two point, unless the distance is relatively small).

Comparing to all values stores on a card is a simple matter of looping, reading a pair from the card, and computing the distance between the current point and the saved point. Break out of the loop if a small enough distance is found. Don't forget to close the file in either case.

The wave shield instructions suggest using specific pins, but they also say that any 5 (or 6?) pins can be used. If there really is a pin conflict, change the pins around. The GPS shouldn't be hardwired to any pins. The wave shield isn't.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Huge thanks smiley

I'll toss the code around and try my luck at getting the pins to not conflict. I'll post progress if I get this thing working closer to what I need.
Logged

Pages: [1]   Go Up
Jump to: