-
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.
Barometer/Temperature/Multi: New class; MPL115A2 & BMP180 support
- Loading branch information
Showing
31 changed files
with
1,442 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!--remove-start--> | ||
|
||
# Barometer - BMP180 | ||
|
||
<!--remove-end--> | ||
|
||
|
||
|
||
|
||
|
||
|
||
### BMP180 | ||
|
||
|
||
|
||
![docs/breadboard/multi-bmp180.png](breadboard/multi-bmp180.png)<br> | ||
|
||
Fritzing diagram: [docs/breadboard/multi-bmp180.fzz](breadboard/multi-bmp180.fzz) | ||
|
||
| ||
|
||
|
||
|
||
|
||
Run with: | ||
```bash | ||
node eg/barometer-BMP180.js | ||
``` | ||
|
||
|
||
```javascript | ||
var five = require("../"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
var barometer = new five.Barometer({ | ||
controller: "BMP180", | ||
freq: 250 | ||
}); | ||
|
||
barometer.on("change", function() { | ||
console.log("barometer"); | ||
console.log(" pressure : ", this.pressure); | ||
console.log("--------------------------------------"); | ||
}); | ||
}); | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
| ||
|
||
<!--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,66 @@ | ||
<!--remove-start--> | ||
|
||
# Barometer - MPL115A2 | ||
|
||
<!--remove-end--> | ||
|
||
|
||
|
||
|
||
|
||
|
||
### MPL115A2 | ||
|
||
|
||
|
||
![docs/breadboard/multi-mpl115a2.png](breadboard/multi-mpl115a2.png)<br> | ||
|
||
Fritzing diagram: [docs/breadboard/multi-mpl115a2.fzz](breadboard/multi-mpl115a2.fzz) | ||
|
||
| ||
|
||
|
||
|
||
|
||
Run with: | ||
```bash | ||
node eg/barometer-mpl115a2.js | ||
``` | ||
|
||
|
||
```javascript | ||
var five = require("johnny-five"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
var barometer = new five.Barometer({ | ||
controller: "MPL115A2" | ||
}); | ||
|
||
barometer.on("data", function() { | ||
console.log("barometer"); | ||
console.log(" pressure : ", this.pressure); | ||
console.log("--------------------------------------"); | ||
}); | ||
}); | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
| ||
|
||
<!--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--> |
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.
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.
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,73 @@ | ||
<!--remove-start--> | ||
|
||
# Multi - BMP180 | ||
|
||
<!--remove-end--> | ||
|
||
|
||
|
||
|
||
|
||
|
||
### Breadboard for "Multi - BMP180" | ||
|
||
|
||
|
||
![docs/breadboard/multi-bmp180.png](breadboard/multi-bmp180.png)<br> | ||
|
||
Fritzing diagram: [docs/breadboard/multi-bmp180.fzz](breadboard/multi-bmp180.fzz) | ||
|
||
| ||
|
||
|
||
|
||
|
||
Run with: | ||
```bash | ||
node eg/multi-bmp180.js | ||
``` | ||
|
||
|
||
```javascript | ||
var five = require("../"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
var multi = new five.Multi({ | ||
controller: "BMP180", | ||
freq: 250 | ||
}); | ||
|
||
multi.on("change", function() { | ||
console.log("temperature"); | ||
console.log(" celsius : ", this.temperature.celsius); | ||
console.log(" fahrenheit : ", this.temperature.fahrenheit); | ||
console.log(" kelvin : ", this.temperature.kelvin); | ||
console.log("--------------------------------------"); | ||
|
||
console.log("barometer"); | ||
console.log(" pressure : ", this.barometer.pressure); | ||
console.log("--------------------------------------"); | ||
}); | ||
}); | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
| ||
|
||
<!--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,77 @@ | ||
<!--remove-start--> | ||
|
||
# Multi - MPL115A2 | ||
|
||
<!--remove-end--> | ||
|
||
|
||
|
||
|
||
|
||
|
||
### Breadboard for "Multi - MPL115A2" | ||
|
||
|
||
|
||
![docs/breadboard/multi-mpl115a2.png](breadboard/multi-mpl115a2.png)<br> | ||
|
||
Fritzing diagram: [docs/breadboard/multi-mpl115a2.fzz](breadboard/multi-mpl115a2.fzz) | ||
|
||
| ||
|
||
|
||
|
||
|
||
Run with: | ||
```bash | ||
node eg/multi-mpl115a2.js | ||
``` | ||
|
||
|
||
```javascript | ||
var five = require("../"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
var multi = new five.Multi({ | ||
controller: "MPL115A2" | ||
}); | ||
|
||
multi.on("change", function() { | ||
console.log("temperature"); | ||
console.log(" celsius : ", this.temperature.celsius); | ||
console.log(" fahrenheit : ", this.temperature.fahrenheit); | ||
console.log(" kelvin : ", this.temperature.kelvin); | ||
console.log("--------------------------------------"); | ||
|
||
console.log("barometer"); | ||
console.log(" pressure : ", this.barometer.pressure); | ||
console.log("--------------------------------------"); | ||
}); | ||
}); | ||
|
||
|
||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Additional Notes | ||
- [MPL115A2 - I2C Barometric Pressure/Temperature Sensor](https://www.adafruit.com/product/992) | ||
|
||
| ||
|
||
<!--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,69 @@ | ||
<!--remove-start--> | ||
|
||
# Temperature - BMP180 | ||
|
||
<!--remove-end--> | ||
|
||
|
||
|
||
|
||
|
||
|
||
### BMP180 | ||
|
||
|
||
|
||
![docs/breadboard/multi-bmp180.png](breadboard/multi-bmp180.png)<br> | ||
|
||
Fritzing diagram: [docs/breadboard/multi-bmp180.fzz](breadboard/multi-bmp180.fzz) | ||
|
||
| ||
|
||
|
||
|
||
|
||
Run with: | ||
```bash | ||
node eg/temperature-BMP180.js | ||
``` | ||
|
||
|
||
```javascript | ||
var five = require("../"); | ||
var board = new five.Board(); | ||
|
||
board.on("ready", function() { | ||
var temperature = new five.Temperature({ | ||
controller: "BMP180", | ||
freq: 250 | ||
}); | ||
|
||
temperature.on("change", function() { | ||
console.log("temperature"); | ||
console.log(" celsius : ", this.celsius); | ||
console.log(" fahrenheit : ", this.fahrenheit); | ||
console.log(" kelvin : ", this.kelvin); | ||
console.log("--------------------------------------"); | ||
}); | ||
}); | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
| ||
|
||
<!--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--> |
Oops, something went wrong.