-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
979 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!--remove-start--> | ||
|
||
# GPS - Adafruit Ultimate GPS Breakout | ||
|
||
<!--remove-end--> | ||
|
||
|
||
|
||
|
||
|
||
|
||
##### Adafruit Ultimate GPS Breakout | ||
|
||
|
||
Example of Adafruit Ultimate GPS on serial. | ||
|
||
|
||
![docs/breadboard/gps-adafruit.png](breadboard/gps-adafruit.png)<br> | ||
|
||
Fritzing diagram: [docs/breadboard/gps-adafruit.fzz](breadboard/gps-adafruit.fzz) | ||
|
||
| ||
|
||
|
||
|
||
|
||
Run this example from the command line with: | ||
```bash | ||
node eg/gps-adafruit.js | ||
``` | ||
|
||
|
||
```javascript | ||
var five = require("johnny-five"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
|
||
/* | ||
* This is the simplest initialization | ||
* We assume SW_SERIAL0 for the port | ||
*/ | ||
var gps = new five.GPS({ | ||
breakout: "ADAFRUIT_ULTIMATE_GPS", | ||
pins: {tx: 10, rx: 11} | ||
}); | ||
|
||
// If lat, long, course or speed change log it | ||
gps.on("change", function() { | ||
console.log(this.latitude, this.longitude); | ||
}); | ||
|
||
}); | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
| ||
|
||
<!--remove-start--> | ||
|
||
## License | ||
Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com> | ||
Licensed under the MIT license. | ||
Copyright (c) 2016 The Johnny-Five Contributors | ||
Licensed under the MIT license. | ||
|
||
<!--remove-end--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!--remove-start--> | ||
|
||
# GPS - Adafruit Ultimate GPS via Hardware Serial | ||
|
||
<!--remove-end--> | ||
|
||
|
||
|
||
|
||
|
||
|
||
##### Adafruit Ultimate GPS via Hardware Serial | ||
|
||
|
||
Example of Adafruit Ultimate GPS on hardware serial. | ||
|
||
|
||
![docs/breadboard/gps-hardware-serial.png](breadboard/gps-hardware-serial.png)<br> | ||
|
||
Fritzing diagram: [docs/breadboard/gps-hardware-serial.fzz](breadboard/gps-hardware-serial.fzz) | ||
|
||
| ||
|
||
|
||
|
||
|
||
Run this example from the command line with: | ||
```bash | ||
node eg/gps-hardware-serial.js | ||
``` | ||
|
||
|
||
```javascript | ||
var five = require("johnny-five"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
|
||
/* | ||
* Explicitly setting HW_SERIAL1 for the port | ||
*/ | ||
var gps = new five.GPS({ | ||
port: "HW_SERIAL1" | ||
}); | ||
|
||
// If lat, long, course or speed change log it | ||
gps.on("change", function(data) { | ||
console.log(data); | ||
}); | ||
|
||
}); | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
| ||
|
||
<!--remove-start--> | ||
|
||
## License | ||
Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com> | ||
Licensed under the MIT license. | ||
Copyright (c) 2016 The Johnny-Five Contributors | ||
Licensed under the MIT license. | ||
|
||
<!--remove-end--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!--remove-start--> | ||
|
||
# GPS - Default GPS | ||
|
||
<!--remove-end--> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Run this example from the command line with: | ||
```bash | ||
node eg/gps.js | ||
``` | ||
|
||
|
||
```javascript | ||
var five = require("johnny-five"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
|
||
/* | ||
* This is the simplest initialization | ||
* We assume SW_SERIAL0 for the port | ||
*/ | ||
var gps = new five.GPS({ | ||
pins: {tx: 10, rx: 11} | ||
}); | ||
|
||
// If lat, long, course or speed change log it | ||
gps.on("change", function() { | ||
console.log(this.latitude, this.longitude); | ||
}); | ||
|
||
}); | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
| ||
|
||
<!--remove-start--> | ||
|
||
## License | ||
Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com> | ||
Licensed under the MIT license. | ||
Copyright (c) 2016 The Johnny-Five Contributors | ||
Licensed under the MIT license. | ||
|
||
<!--remove-end--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
var five = require("../lib/johnny-five.js"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
|
||
/* | ||
* This is the simplest initialization | ||
* We assume SW_SERIAL0 for the port | ||
*/ | ||
var gps = new five.GPS({ | ||
breakout: "ADAFRUIT_ULTIMATE_GPS", | ||
pins: {tx: 10, rx: 11} | ||
}); | ||
|
||
// If lat, long, course or speed change log it | ||
gps.on("change", function() { | ||
console.log(this.latitude, this.longitude); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var five = require("../lib/johnny-five.js"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
|
||
/* | ||
* Explicitly setting HW_SERIAL1 for the port | ||
*/ | ||
var gps = new five.GPS({ | ||
port: this.io.SERIAL_PORT_IDs.HW_SERIAL1 | ||
}); | ||
|
||
// If lat, long, course or speed change log it | ||
gps.on("change", function() { | ||
console.log(this.latitude, this.longitude); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var five = require("../lib/johnny-five.js"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
|
||
/* | ||
* This is the simplest initialization | ||
* We assume SW_SERIAL0 for the port | ||
*/ | ||
var gps = new five.GPS({ | ||
pins: {tx: 10, rx: 11} | ||
}); | ||
|
||
// If lat, long, course or speed change log it | ||
gps.on("change", function() { | ||
console.log(this.latitude, this.longitude); | ||
}); | ||
|
||
}); |
Oops, something went wrong.