Flora GPS Jacket project issue

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Mathpun
 
Posts: 71
Joined: Mon Feb 19, 2018 1:35 pm

Flora GPS Jacket project issue

Post by Mathpun »

Hello! I have hooked everything up according to the project (https://learn.adafruit.com/flora-gps-jacket/), and my serial monitor is reflecting GPS coordinates correctly and my neopixels are lighting up BUT the problem is they are always lighting up no matter how much I change the GPS locations! I am using pretty much the exact code from the project page minus a few differences -- see following:

Here are my coordinates: (37.875115,-122.258222)

I change the following to my coordinates:
#define GEO_LAT
#define GEO_LON
and I make sure my
#define DESTINATION_DISTANCE

is only 2 meters

SO when I change the GEO_LAT and GEO_LON to crazy numbers far far away, it uploads successfully but the LEDS never go out. They keep staying on. I also only have 2 LEDS but did change this line:
Adafruit_FloraPixel strip = Adafruit_FloraPixel(2);

to 2 since I only have 2!

SO my question is why don't the LEDS go out? I want them to turn on when i'm close to the GPS coordinates like shown in the project video

ALSO there are other parts of the code where it can show you where to go....what do those require,, just LEDS? Or can you use a screen?

THANKS :)

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora GPS Jacket project issue

Post by adafruit_support_mike »

Uncomment line 149 to see how far the code thinks you are from the destination:

Code: Select all

      headingDistance((double)calc_dist(fLat, fLon, targetLat, targetLon));
      //Serial.print("Distance Remaining:"); Serial.println((double)calc_dist(fLat, fLon, targetLat, targetLon));

User avatar
Mathpun
 
Posts: 71
Joined: Mon Feb 19, 2018 1:35 pm

Re: Flora GPS Jacket project issue

Post by Mathpun »

Thanks for your reply! I did that and it said:

Distance Remaining:12781405.00
Location: 3753.14N, 12218.16W
12781405.00
Distance Remaining:12781405.00
Location: 3753.14N, 12218.16W
12781405.00

So what does that mean?

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Flora GPS Jacket project issue

Post by adafruit_support_mike »

That's definitely larger than the distant constant should be.

Head down to the function headingDistance() around line 260, and uncomment the diagnostic Serial.print() statements there. That will tell you whether the logic is doing what it's supposed to.

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”