Hardware Reference
In-Depth Information
Compass mode works by always pointing north with a blue
LED.
The code for the FLORA NeoGeo Watch is pretty simple and
straightforward. We are using the standard Adafruit GPS library,
the Adafruit LSM303DLHC library, and a time library. You will
find links to the libraries—as well as the NeoGeo Watch source
code—on GitHub .
Follow each library's README file for more information about
installing the libraries.
Be sure to test out the pixel sample code to ensure your pixels
are functioning properly. See “Get Your Code On” on page 51 for
details on running the “strandtest” sketch.
Next, we need to test out the GPS module. Enter this code into
the Arduino IDE and upload it to your FLORA with the GPS mod-
ule attached:
// test a passthru between USB and hardware serial
void setup () {
while ( ! Serial );
Serial . begin ( 9600 );
Serial1 . begin ( 9600 );
}
void loop () {
if ( Serial . available ()) {
char c = Serial . read ();
Serial1 . write ( c );
}
if ( Serial1 . available ()) {
char c = Serial1 . read ();
Serial . write ( c );
}
}
To make sure your GPS has a direct view of the sky, hang your
watch out the window (but don't let it fall out!). I used a USB
extension cable so I could have the watch out the window but
still plugged in to the computer.
Search WWH ::




Custom Search