Neo Geo Watch sketch not compiling

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
Studiologe
 
Posts: 2
Joined: Wed Mar 25, 2015 9:28 pm

Neo Geo Watch sketch not compiling

Post by Studiologe »

Hi,
I tried to follow the learn tutorial but I have following issues.

1. I tried to run the sketch on Arduino Uno R3, hooked up Accelerometer and GPS like shown,
on compile I get this error, that I can't fix:
Flora_NeoGeo_Watch.ino:21:19: error: 'Serial1' was not declared in this scope
it is in this line:
Adafruit_GPS GPS(&Serial1);


2. Next issue is. I got rid of all that stuff that I don't need in the sketch and just tried to get the LSM303 going, it did compile error free, so I uploaded it and my LED on 24NEO Ring jumps happily around. Then I tried to follow the instructions to calibrate the LSM303 and got the min/max values, but I couldn't enter them into the original sketch hence the following lines were missing:
// Calibration values. Use the Calibrate example program to get the values for
// your compass.
compass.m_min.x = -809; compass.m_min.y = -491; compass.m_min.z = -793;
compass.m_max.x = +451; compass.m_max.y = +697; compass.m_max.z = 438;

like it says in the learn tutorial, but those lines are NOT in the sketch and if I manually add them I get the following error on top of it.:
error: 'compass' does not name a type


Any ideas, what is messed up here? seems like the github example has been modified and those lines have been removed.
I'm stuck and would like to get my LSM303 working without GPS on an Uno R3 with 24 NeoPixel Ring.


Thanks guys, any hints will be greatly appreciated.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Neo Geo Watch sketch not compiling

Post by adafruit_support_rick »

You get the problem with Serial1 because the NeoGeo was written for a Flora, which has a hardware Serial1 port. The Uno does not. You can define a 'Serial1' with Software Serial on the Uno.

We are aware of the problem with the calibration code, and the tutorial is being revised. Until the tutorial is ready, just skip the calibration code.

User avatar
Studiologe
 
Posts: 2
Joined: Wed Mar 25, 2015 9:28 pm

Re: Neo Geo Watch sketch not compiling

Post by Studiologe »

Hi,
thanks for the reply.
Where would I do that in the code? Because if I modify the code from this
ORIGINAL:
Adafruit_GPS GPS(&Serial1);

to this:
//Adafruit_GPS GPS(&Serial1);
SoftwareSerial GPS(10, 11); // RX, TX


I get the following errors:

Flora_NeoGeo_Watch.ino: In function 'void setup()':
Flora_NeoGeo_Watch:118: error: 'class SoftwareSerial' has no member named 'sendCommand'

and many more, since they all are part of the class in Adafruit_GPS

Any ideas, where to place the softwareSerial ??

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Neo Geo Watch sketch not compiling

Post by adafruit_support_rick »

Code: Select all

SoftwareSerial Serial1 = SoftwareSerial(10,11);
Adafruit_GPS GPS(&Serial1);

User avatar
tcooper
 
Posts: 54
Joined: Mon Apr 23, 2012 10:31 pm

Re: Neo Geo Watch sketch not compiling

Post by tcooper »

As the libraries for Adafruit breakout boards are constantly evolving, sometimes the guides on the Adafruit Learning System don't keep up. I have gone through and rewritten The Code page for the Neo Geo Watch. Thankfully, with the new LSM303 library, it is much easier to get the watch up and running.

https://learn.adafruit.com/flora-geo-watch/the-code

Let me know if you have any questions.

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

Return to “Wearables”