Permalink
Browse files

Multi/Thermometer/Hygrometer: SI7021

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information...
1 parent 1b968f4 commit 13eb1bea80d7b0f0727ffd1d2b76608e3528c42e @rwaldron committed Nov 23, 2016
View
@@ -171,7 +171,7 @@ To get you up and running quickly, we provide a variety of examples for using ea
To interactively navigate the examples, visit the [Johnny-Five examples](http://johnny-five.io/examples/) page on the official website. If you want to link directly to the examples in this repo, you can use one of the following links.
-**There are presently 349 example programs with code and diagrams!**
+**There are presently 353 example programs with code and diagrams!**
<!--extract-start:examples-->
@@ -386,6 +386,7 @@ To interactively navigate the examples, visit the [Johnny-Five examples](http://
- [Multi - MS5611](https://github.com/rwaldron/johnny-five/blob/master/docs/multi-MS5611.md)
- [Multi - SHT31D](https://github.com/rwaldron/johnny-five/blob/master/docs/multi-sht31d.md)
- [Multi - SI7020](https://github.com/rwaldron/johnny-five/blob/master/docs/multi-SI7020.md)
+- [Multi - SI7021](https://github.com/rwaldron/johnny-five/blob/master/docs/multi-SI7021.md)
- [Multi - TH02](https://github.com/rwaldron/johnny-five/blob/master/docs/multi-TH02.md)
### Sensors
@@ -415,6 +416,7 @@ To interactively navigate the examples, visit the [Johnny-Five examples](http://
- [Hygrometer - HIH6130](https://github.com/rwaldron/johnny-five/blob/master/docs/hygrometer-HIH6130.md)
- [Hygrometer - HTU21D](https://github.com/rwaldron/johnny-five/blob/master/docs/hygrometer-htu21d.md)
- [Hygrometer - SHT31D](https://github.com/rwaldron/johnny-five/blob/master/docs/hygrometer-sht31d.md)
+- [Hygrometer - SI7021](https://github.com/rwaldron/johnny-five/blob/master/docs/hygrometer-SI7021.md)
- [Hygrometer - TH02](https://github.com/rwaldron/johnny-five/blob/master/docs/hygrometer-TH02.md)
- [Sensor](https://github.com/rwaldron/johnny-five/blob/master/docs/sensor.md)
- [Sensor - Force sensitive resistor](https://github.com/rwaldron/johnny-five/blob/master/docs/sensor-fsr.md)
@@ -440,6 +442,7 @@ To interactively navigate the examples, visit the [Johnny-Five examples](http://
- [Thermometer - MS5611](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-MS5611.md)
- [Thermometer - SHT31D](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-sht31d.md)
- [Thermometer - SI7020](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-SI7020.md)
+- [Thermometer - SI7021](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-SI7021.md)
- [Thermometer - TH02](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-TH02.md)
- [Thermometer - TMP102](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-tmp102.md)
- [Thermometer - TMP36](https://github.com/rwaldron/johnny-five/blob/master/docs/temperature-tmp36.md)
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.
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.
@@ -0,0 +1,69 @@
+<!--remove-start-->
+
+# Hygrometer - SI7021
+
+<!--remove-end-->
+
+
+
+
+
+
+##### SI7021
+
+
+
+![docs/breadboard/multi-SI7021.png](breadboard/multi-SI7021.png)<br>
+
+Fritzing diagram: [docs/breadboard/multi-SI7021.fzz](breadboard/multi-SI7021.fzz)
+
+&nbsp;
+
+
+
+
+Run this example from the command line with:
+```bash
+node eg/hygrometer-SI7021.js
+```
+
+
+```javascript
+var five = require("johnny-five");
+var board = new five.Board();
+
+board.on("ready", function() {
+ var hygrometer = new five.Hygrometer({
+ controller: "SI7021"
+ });
+
+ hygrometer.on("data", function() {
+ console.log(this.relativeHumidity + " %");
+ });
+});
+
+```
+
+
+
+
+
+
+
+
+
+## Learn More
+
+- [Si7021 Humidity and Temperature Sensor Hookup Guide](https://learn.sparkfun.com/tutorials/si7021-humidity-and-temperature-sensor-hookup-guide)
+
+&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-->
View
@@ -0,0 +1,88 @@
+<!--remove-start-->
+
+# Multi - SI7021
+
+<!--remove-end-->
+
+
+
+
+
+
+##### Tessel with SI7021
+
+
+
+![docs/breadboard/multi-SI7021.png](breadboard/multi-SI7021.png)<br>
+
+Fritzing diagram: [docs/breadboard/multi-SI7021.fzz](breadboard/multi-SI7021.fzz)
+
+&nbsp;
+
+
+
+
+Run this example from the command line with:
+```bash
+node eg/multi-SI7021.js
+```
+
+
+```javascript
+var five = require("../");
+var board = new five.Board();
+
+board.on("ready", function() {
+ var multi = new five.Multi({
+ controller: "SI7021"
+ });
+
+ multi.on("change", function() {
+ console.log("Thermometer");
+ console.log(" celsius : ", this.thermometer.celsius);
+ console.log(" fahrenheit : ", this.thermometer.fahrenheit);
+ console.log(" kelvin : ", this.thermometer.kelvin);
+ console.log("--------------------------------------");
+
+ console.log("Hygrometer");
+ console.log(" relative humidity : ", this.hygrometer.relativeHumidity);
+ console.log("--------------------------------------");
+ });
+});
+
+```
+
+
+## Illustrations / Photos
+
+
+##### Arduino with SI7021
+
+
+
+![docs/breadboard/multi-SI7021-uno.png](breadboard/multi-SI7021-uno.png)<br>
+
+Fritzing diagram: [docs/breadboard/multi-SI7021-uno.fzz](breadboard/multi-SI7021-uno.fzz)
+
+&nbsp;
+
+
+
+
+
+
+## Learn More
+
+- [Si7021 Humidity and Temperature Sensor Hookup Guide](https://learn.sparkfun.com/tutorials/si7021-humidity-and-temperature-sensor-hookup-guide)
+
+&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-->
@@ -0,0 +1,84 @@
+<!--remove-start-->
+
+# Thermometer - SI7021
+
+<!--remove-end-->
+
+
+
+
+
+
+##### Tessel with SI7021
+
+
+
+![docs/breadboard/multi-SI7021.png](breadboard/multi-SI7021.png)<br>
+
+Fritzing diagram: [docs/breadboard/multi-SI7021.fzz](breadboard/multi-SI7021.fzz)
+
+&nbsp;
+
+
+
+
+Run this example from the command line with:
+```bash
+node eg/temperature-SI7021.js
+```
+
+
+```javascript
+var five = require("../");
+var Tessel = require("tessel-io");
+var board = new five.Board({
+ io: new Tessel()
+});
+
+board.on("ready", function() {
+ var temp = new five.Thermometer({
+ controller: "SI7021",
+ port: "A"
+ });
+
+ temp.on("change", function() {
+ console.log(this.celsius + "°C", this.fahrenheit + "°F");
+ });
+});
+
+```
+
+
+## Illustrations / Photos
+
+
+##### Arduino with SI7021
+
+
+
+![docs/breadboard/multi-SI7021-uno.png](breadboard/multi-SI7021-uno.png)<br>
+
+Fritzing diagram: [docs/breadboard/multi-SI7021-uno.fzz](breadboard/multi-SI7021-uno.fzz)
+
+&nbsp;
+
+
+
+
+
+
+## Learn More
+
+- [Si7021 Humidity and Temperature Sensor Hookup Guide](https://learn.sparkfun.com/tutorials/si7021-humidity-and-temperature-sensor-hookup-guide)
+
+&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-->
@@ -0,0 +1,12 @@
+var five = require("../lib/johnny-five.js");
+var board = new five.Board();
+
+board.on("ready", function() {
+ var hygrometer = new five.Hygrometer({
+ controller: "SI7021"
+ });
+
+ hygrometer.on("data", function() {
+ console.log(this.relativeHumidity + " %");
+ });
+});
View
@@ -0,0 +1,20 @@
+var five = require("../");
+var board = new five.Board();
+
+board.on("ready", function() {
+ var multi = new five.Multi({
+ controller: "SI7021"
+ });
+
+ multi.on("change", function() {
+ console.log("Thermometer");
+ console.log(" celsius : ", this.thermometer.celsius);
+ console.log(" fahrenheit : ", this.thermometer.fahrenheit);
+ console.log(" kelvin : ", this.thermometer.kelvin);
+ console.log("--------------------------------------");
+
+ console.log("Hygrometer");
+ console.log(" relative humidity : ", this.hygrometer.relativeHumidity);
+ console.log("--------------------------------------");
+ });
+});
@@ -0,0 +1,16 @@
+var five = require("../");
+var Tessel = require("tessel-io");
+var board = new five.Board({
+ io: new Tessel()
+});
+
+board.on("ready", function() {
+ var temp = new five.Thermometer({
+ controller: "SI7021",
+ port: "A"
+ });
+
+ temp.on("change", function() {
+ console.log(this.celsius + "°C", this.fahrenheit + "°F");
+ });
+});
View
@@ -156,6 +156,7 @@ var Controllers = {
Controllers.DHT11_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
Controllers.DHT21_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
Controllers.DHT22_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
+Controllers.SI7021 = Controllers.SI7020;
function Hygrometer(opts) {
View
@@ -2376,6 +2376,7 @@ var Drivers = {
// Otherwise known as...
Drivers.BMP085 = Drivers.BMP180;
Drivers.GY521 = Drivers.MPU6050;
+Drivers.SI7021 = Drivers.SI7020;
Drivers.DHT11_I2C_NANO_BACKPACK = Drivers.DHT_I2C_NANO_BACKPACK;
Drivers.DHT21_I2C_NANO_BACKPACK = Drivers.DHT_I2C_NANO_BACKPACK;
Drivers.DHT22_I2C_NANO_BACKPACK = Drivers.DHT_I2C_NANO_BACKPACK;
@@ -2592,6 +2593,7 @@ var Controllers = {
// Otherwise known as...
Controllers.BMP085 = Controllers.BMP180;
Controllers.GY521 = Controllers.MPU6050;
+Controllers.SI7021 = Controllers.SI7020;
Controllers.DHT11_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
Controllers.DHT21_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
Controllers.DHT22_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
View
@@ -906,6 +906,7 @@ var Controllers = {
Controllers.BMP085 = Controllers.BMP180;
Controllers.GY521 = Controllers.MPU6050;
+Controllers.SI7021 = Controllers.SI7020;
Controllers.DHT11_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
Controllers.DHT21_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
Controllers.DHT22_I2C_NANO_BACKPACK = Controllers.DHT_I2C_NANO_BACKPACK;
Oops, something went wrong.

0 comments on commit 13eb1be

Please sign in to comment.