Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dtex authored and rwaldron committed Mar 15, 2016
1 parent c9a370c commit 53e0efb
Show file tree
Hide file tree
Showing 16 changed files with 979 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ To interactively navigate the examples, visit the [Johnny-Five examples](http://
- [Servo - Tessel Servo Module](https://github.com/rwaldron/johnny-five/blob/master/docs/servo-tessel-servo-module.md)
- [Servos - An array of servos](https://github.com/rwaldron/johnny-five/blob/master/docs/servo-array.md)

### GPS
- [GPS - Adafruit Ultimate GPS Breakout](https://github.com/rwaldron/johnny-five/blob/master/docs/gps-adafruit.md)
- [GPS - Default GPS](https://github.com/rwaldron/johnny-five/blob/master/docs/gps.md)

### Servo Animation
- [Servo - Animation](https://github.com/rwaldron/johnny-five/blob/master/docs/servo-animation.md)
- [Servo - Leg Animation](https://github.com/rwaldron/johnny-five/blob/master/docs/servo-animation-leg.md)
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ environment:

install:
- ps: Install-Product node $env:nodejs_version
- npm cache clean
- npm install

build: off
Expand Down
Binary file added docs/breadboard/gps-adafruit.fzz
Binary file not shown.
Binary file added docs/breadboard/gps-adafruit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/breadboard/gps-hardware-serial.fzz
Binary file not shown.
Binary file added docs/breadboard/gps-hardware-serial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions docs/gps-adafruit.md
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)

&nbsp;




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);
});

});

```








&nbsp;

<!--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-->
72 changes: 72 additions & 0 deletions docs/gps-hardware-serial.md
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)

&nbsp;




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);
});

});

```








&nbsp;

<!--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-->
60 changes: 60 additions & 0 deletions docs/gps.md
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);
});

});

```








&nbsp;

<!--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-->
20 changes: 20 additions & 0 deletions eg/gps-adafruit.js
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);
});

});
18 changes: 18 additions & 0 deletions eg/gps-hardware-serial.js
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);
});

});
19 changes: 19 additions & 0 deletions eg/gps.js
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);
});

});
Loading

0 comments on commit 53e0efb

Please sign in to comment.