Skip to content

Commit

Permalink
Barometer/Temperature/Multi: New class; MPL115A2 & BMP180 support
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Jun 12, 2015
1 parent f610150 commit e24beb1
Show file tree
Hide file tree
Showing 31 changed files with 1,442 additions and 55 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,10 @@ To interactively navigate the examples, visit the [Johnny-Five examples](http://
### Piezo
- [Piezo](https://github.com/rwaldron/johnny-five/blob/master/docs/piezo.md)

### IMU
### IMU/Multi
- [IMU - MPU6050](https://github.com/rwaldron/johnny-five/blob/master/docs/imu-mpu6050.md)
- [Multi - MPL115A2](https://github.com/rwaldron/johnny-five/blob/master/docs/multi-mpl115a2.md)
- [Multi - BMP180](https://github.com/rwaldron/johnny-five/blob/master/docs/multi-bmp180.md)

### Sensors
- [Sensor](https://github.com/rwaldron/johnny-five/blob/master/docs/sensor.md)
Expand All @@ -335,6 +337,10 @@ To interactively navigate the examples, visit the [Johnny-Five examples](http://
- [Temperature - LM35](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-lm35.md)
- [Temperature - DS18B20](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-ds18b20.md)
- [Temperature - MPU6050](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-mpu6050.md)
- [Barometer - MPL115A2](https://github.com/rwaldron/johnny-five/blob/master/docs/barometer-mpl115a2.md)
- [Temperature - MPL115A2](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-mpl115a2.md)
- [Barometer - BMP180](https://github.com/rwaldron/johnny-five/blob/master/docs/barometer-BMP180.md)
- [Temperature - BMP180](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-BMP180.md)

### Grove IoT Kit (Seeed Studio)
- [Grove - LED](https://github.com/rwaldron/johnny-five/blob/master/docs/grove-led.md)
Expand Down
67 changes: 67 additions & 0 deletions docs/barometer-BMP180.md
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)

&nbsp;




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

```








&nbsp;

<!--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-->
66 changes: 66 additions & 0 deletions docs/barometer-mpl115a2.md
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)

&nbsp;




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

```








&nbsp;

<!--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-->
Binary file added docs/breadboard/barometer-mpl115a2.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/multi-bmp180.fzz
Binary file not shown.
Binary file added docs/breadboard/multi-bmp180.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/multi-mpl115a2.fzz
Binary file not shown.
Binary file added docs/breadboard/multi-mpl115a2.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/temperature-mpl115a2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions docs/multi-bmp180.md
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)

&nbsp;




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

```








&nbsp;

<!--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-->
77 changes: 77 additions & 0 deletions docs/multi-mpl115a2.md
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)

&nbsp;




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)

&nbsp;

<!--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-->
69 changes: 69 additions & 0 deletions docs/temperature-BMP180.md
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)

&nbsp;




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

```








&nbsp;

<!--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

0 comments on commit e24beb1

Please sign in to comment.