Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gyro Docs breadboard diagram. Closes gh-600
- Loading branch information
Showing
6 changed files
with
72 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
Binary file not shown.
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,50 @@ | ||
<!--remove-start--> | ||
# Gyro Lpr5150l | ||
|
||
Run with: | ||
```bash | ||
node eg/gyro-lpr5150l.js | ||
``` | ||
<!--remove-end--> | ||
|
||
```javascript | ||
var five = require("johnny-five"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
var gyro = new five.Gyro({ | ||
pins: ["A0", "A1"] | ||
}); | ||
|
||
gyro.on("change", function() { | ||
console.log("gyro"); | ||
console.log(" x : ", this.x); | ||
console.log(" y : ", this.y); | ||
console.log(" pitch : ", this.pitch); | ||
console.log(" roll : ", this.roll); | ||
console.log(" yaw : ", this.yaw); | ||
console.log(" rate : ", this.rate); | ||
console.log(" isCalibrated : ", this.isCalibrated); | ||
console.log("--------------------------------------"); | ||
}); | ||
}); | ||
|
||
``` | ||
|
||
|
||
## Breadboard/Illustration | ||
|
||
|
||
![docs/breadboard/gyro-lpr5150l.png](breadboard/gyro-lpr5150l.png) | ||
[docs/breadboard/gyro-lpr5150l.fzz](breadboard/gyro-lpr5150l.fzz) | ||
|
||
|
||
|
||
|
||
<!--remove-start--> | ||
## License | ||
Copyright (c) 2012, 2013, 2014 Rick Waldron <waldron.rick@gmail.com> | ||
Licensed under the MIT license. | ||
Copyright (c) 2014, 2015 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() { | ||
var gyro = new five.Gyro({ | ||
pins: ["A0", "A1"] | ||
}); | ||
|
||
gyro.on("change", function() { | ||
console.log("gyro"); | ||
console.log(" x : ", this.x); | ||
console.log(" y : ", this.y); | ||
console.log(" pitch : ", this.pitch); | ||
console.log(" roll : ", this.roll); | ||
console.log(" yaw : ", this.yaw); | ||
console.log(" rate : ", this.rate); | ||
console.log(" isCalibrated : ", this.isCalibrated); | ||
console.log("--------------------------------------"); | ||
}); | ||
}); |
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