raspberry_pi_iot 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/IoT.html +3 -3
- data/doc/RaspberryPiIoT.html +2 -2
- data/doc/_index.html +8 -1
- data/doc/class_list.html +1 -1
- data/doc/file.LICENSE.html +1 -1
- data/doc/file.README.html +30 -25
- data/doc/index.html +30 -25
- data/doc/method_list.html +61 -37
- data/doc/top-level-namespace.html +1 -1
- data/lib/iot/htu21d.rb +62 -0
- data/lib/raspberry_pi_iot/version.rb +1 -1
- data/test/test.txt +43 -32
- data/test/test_ds18b20.rb +1 -1
- data/test/test_htu21d.rb +34 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80d9a091b7c7d944b549e453e0d868885e425cc91fc102434bc1012bbc21b076
|
4
|
+
data.tar.gz: d058336d5edd72cfdcea78b7386645715796ca7d4b3bac8d58a29312fdaef84b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e49e5fe813a7a4a2b13886dec5ceceeb3516743848374517baba32b4642fee328a0051a06086abc9cf0e39f1d0b6de55b22f781cb7e57a2522d828a4ff2c17df
|
7
|
+
data.tar.gz: e70f3ae34e5ecc78570e01bbd06643003a99a43385177c9f7c535cddd5d4d0db9c2671a5fe2c5bdb2132278ad35daf9ee065aedec4514a24cda90bcc1f22bb45
|
data/doc/IoT.html
CHANGED
@@ -79,7 +79,7 @@
|
|
79
79
|
<dl>
|
80
80
|
<dt>Defined in:</dt>
|
81
81
|
<dd>lib/iot/ds18b20.rb<span class="defines">,<br />
|
82
|
-
lib/iot/actuator.rb,<br /> lib/iot/bh1750.rb,<br /> lib/iot/binary_actuator.rb,<br /> lib/iot/binary_effector.rb,<br /> lib/iot/binary_receptor.rb,<br /> lib/iot/binary_sensor.rb,<br /> lib/iot/bmx_sensor.rb,<br /> lib/iot/button.rb,<br /> lib/iot/dht_sensor.rb,<br /> lib/iot/digital_actuator.rb,<br /> lib/iot/digital_effector.rb,<br /> lib/iot/digital_receptor.rb,<br /> lib/iot/digital_sensor.rb,<br /> lib/iot/effector.rb,<br /> lib/iot/hcsr501.rb,<br /> lib/iot/humiture_sensor.rb,<br /> lib/iot/led_pwm.rb,<br /> lib/iot/led.rb,<br /> lib/iot/led_rgb.rb,<br /> lib/iot/max44009.rb,<br /> lib/iot/receptor.rb,<br /> lib/iot/sensor.rb,<br /> lib/iot/temperature_sensor.rb</span>
|
82
|
+
lib/iot/actuator.rb,<br /> lib/iot/bh1750.rb,<br /> lib/iot/binary_actuator.rb,<br /> lib/iot/binary_effector.rb,<br /> lib/iot/binary_receptor.rb,<br /> lib/iot/binary_sensor.rb,<br /> lib/iot/bmx_sensor.rb,<br /> lib/iot/button.rb,<br /> lib/iot/dht_sensor.rb,<br /> lib/iot/digital_actuator.rb,<br /> lib/iot/digital_effector.rb,<br /> lib/iot/digital_receptor.rb,<br /> lib/iot/digital_sensor.rb,<br /> lib/iot/effector.rb,<br /> lib/iot/hcsr501.rb,<br /> lib/iot/htu21d.rb,<br /> lib/iot/humiture_sensor.rb,<br /> lib/iot/led_pwm.rb,<br /> lib/iot/led.rb,<br /> lib/iot/led_rgb.rb,<br /> lib/iot/max44009.rb,<br /> lib/iot/receptor.rb,<br /> lib/iot/sensor.rb,<br /> lib/iot/temperature_sensor.rb</span>
|
83
83
|
</dd>
|
84
84
|
</dl>
|
85
85
|
|
@@ -102,7 +102,7 @@
|
|
102
102
|
|
103
103
|
|
104
104
|
|
105
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="IoT/Actuator.html" title="IoT::Actuator (class)">Actuator</a></span>, <span class='object_link'><a href="IoT/BH1750.html" title="IoT::BH1750 (class)">BH1750</a></span>, <span class='object_link'><a href="IoT/BME280.html" title="IoT::BME280 (class)">BME280</a></span>, <span class='object_link'><a href="IoT/BMP280.html" title="IoT::BMP280 (class)">BMP280</a></span>, <span class='object_link'><a href="IoT/BMxSensor.html" title="IoT::BMxSensor (class)">BMxSensor</a></span>, <span class='object_link'><a href="IoT/BinaryActuator.html" title="IoT::BinaryActuator (class)">BinaryActuator</a></span>, <span class='object_link'><a href="IoT/BinaryEffector.html" title="IoT::BinaryEffector (class)">BinaryEffector</a></span>, <span class='object_link'><a href="IoT/BinaryReceptor.html" title="IoT::BinaryReceptor (class)">BinaryReceptor</a></span>, <span class='object_link'><a href="IoT/BinarySensor.html" title="IoT::BinarySensor (class)">BinarySensor</a></span>, <span class='object_link'><a href="IoT/Button.html" title="IoT::Button (class)">Button</a></span>, <span class='object_link'><a href="IoT/DHT11.html" title="IoT::DHT11 (class)">DHT11</a></span>, <span class='object_link'><a href="IoT/DHT22.html" title="IoT::DHT22 (class)">DHT22</a></span>, <span class='object_link'><a href="IoT/DHTxxSensor.html" title="IoT::DHTxxSensor (class)">DHTxxSensor</a></span>, <span class='object_link'><a href="IoT/DS18B20.html" title="IoT::DS18B20 (class)">DS18B20</a></span>, <span class='object_link'><a href="IoT/DigitalActuator.html" title="IoT::DigitalActuator (class)">DigitalActuator</a></span>, <span class='object_link'><a href="IoT/DigitalEffector.html" title="IoT::DigitalEffector (class)">DigitalEffector</a></span>, <span class='object_link'><a href="IoT/DigitalReceptor.html" title="IoT::DigitalReceptor (class)">DigitalReceptor</a></span>, <span class='object_link'><a href="IoT/DigitalSensor.html" title="IoT::DigitalSensor (class)">DigitalSensor</a></span>, <span class='object_link'><a href="IoT/Effector.html" title="IoT::Effector (class)">Effector</a></span>, <span class='object_link'><a href="IoT/HCSR501.html" title="IoT::HCSR501 (class)">HCSR501</a></span>, <span class='object_link'><a href="IoT/HumitureSensor.html" title="IoT::HumitureSensor (class)">HumitureSensor</a></span>, <span class='object_link'><a href="IoT/LED.html" title="IoT::LED (class)">LED</a></span>, <span class='object_link'><a href="IoT/MAX44009.html" title="IoT::MAX44009 (class)">MAX44009</a></span>, <span class='object_link'><a href="IoT/Receptor.html" title="IoT::Receptor (class)">Receptor</a></span>, <span class='object_link'><a href="IoT/Sensor.html" title="IoT::Sensor (class)">Sensor</a></span>, <span class='object_link'><a href="IoT/TemperatureSensor.html" title="IoT::TemperatureSensor (class)">TemperatureSensor</a></span>
|
105
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="IoT/Actuator.html" title="IoT::Actuator (class)">Actuator</a></span>, <span class='object_link'><a href="IoT/BH1750.html" title="IoT::BH1750 (class)">BH1750</a></span>, <span class='object_link'><a href="IoT/BME280.html" title="IoT::BME280 (class)">BME280</a></span>, <span class='object_link'><a href="IoT/BMP280.html" title="IoT::BMP280 (class)">BMP280</a></span>, <span class='object_link'><a href="IoT/BMxSensor.html" title="IoT::BMxSensor (class)">BMxSensor</a></span>, <span class='object_link'><a href="IoT/BinaryActuator.html" title="IoT::BinaryActuator (class)">BinaryActuator</a></span>, <span class='object_link'><a href="IoT/BinaryEffector.html" title="IoT::BinaryEffector (class)">BinaryEffector</a></span>, <span class='object_link'><a href="IoT/BinaryReceptor.html" title="IoT::BinaryReceptor (class)">BinaryReceptor</a></span>, <span class='object_link'><a href="IoT/BinarySensor.html" title="IoT::BinarySensor (class)">BinarySensor</a></span>, <span class='object_link'><a href="IoT/Button.html" title="IoT::Button (class)">Button</a></span>, <span class='object_link'><a href="IoT/DHT11.html" title="IoT::DHT11 (class)">DHT11</a></span>, <span class='object_link'><a href="IoT/DHT22.html" title="IoT::DHT22 (class)">DHT22</a></span>, <span class='object_link'><a href="IoT/DHTxxSensor.html" title="IoT::DHTxxSensor (class)">DHTxxSensor</a></span>, <span class='object_link'><a href="IoT/DS18B20.html" title="IoT::DS18B20 (class)">DS18B20</a></span>, <span class='object_link'><a href="IoT/DigitalActuator.html" title="IoT::DigitalActuator (class)">DigitalActuator</a></span>, <span class='object_link'><a href="IoT/DigitalEffector.html" title="IoT::DigitalEffector (class)">DigitalEffector</a></span>, <span class='object_link'><a href="IoT/DigitalReceptor.html" title="IoT::DigitalReceptor (class)">DigitalReceptor</a></span>, <span class='object_link'><a href="IoT/DigitalSensor.html" title="IoT::DigitalSensor (class)">DigitalSensor</a></span>, <span class='object_link'><a href="IoT/Effector.html" title="IoT::Effector (class)">Effector</a></span>, <span class='object_link'><a href="IoT/HCSR501.html" title="IoT::HCSR501 (class)">HCSR501</a></span>, <span class='object_link'><a href="IoT/HTU21D.html" title="IoT::HTU21D (class)">HTU21D</a></span>, <span class='object_link'><a href="IoT/HumitureSensor.html" title="IoT::HumitureSensor (class)">HumitureSensor</a></span>, <span class='object_link'><a href="IoT/LED.html" title="IoT::LED (class)">LED</a></span>, <span class='object_link'><a href="IoT/MAX44009.html" title="IoT::MAX44009 (class)">MAX44009</a></span>, <span class='object_link'><a href="IoT/Receptor.html" title="IoT::Receptor (class)">Receptor</a></span>, <span class='object_link'><a href="IoT/Sensor.html" title="IoT::Sensor (class)">Sensor</a></span>, <span class='object_link'><a href="IoT/TemperatureSensor.html" title="IoT::TemperatureSensor (class)">TemperatureSensor</a></span>
|
106
106
|
|
107
107
|
|
108
108
|
</p>
|
@@ -118,7 +118,7 @@
|
|
118
118
|
</div>
|
119
119
|
|
120
120
|
<div id="footer">
|
121
|
-
Generated on
|
121
|
+
Generated on Mon Jun 15 20:05:15 2020 by
|
122
122
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
123
123
|
0.9.20 (ruby-2.5.5).
|
124
124
|
</div>
|
data/doc/RaspberryPiIoT.html
CHANGED
@@ -95,7 +95,7 @@
|
|
95
95
|
<dt id="VERSION-constant" class="">VERSION =
|
96
96
|
|
97
97
|
</dt>
|
98
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.1.
|
98
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.1.4</span><span class='tstring_end'>"</span></span></pre></dd>
|
99
99
|
|
100
100
|
</dl>
|
101
101
|
|
@@ -111,7 +111,7 @@
|
|
111
111
|
</div>
|
112
112
|
|
113
113
|
<div id="footer">
|
114
|
-
Generated on
|
114
|
+
Generated on Mon Jun 15 20:05:15 2020 by
|
115
115
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
116
116
|
0.9.20 (ruby-2.5.5).
|
117
117
|
</div>
|
data/doc/_index.html
CHANGED
@@ -255,6 +255,13 @@
|
|
255
255
|
|
256
256
|
</li>
|
257
257
|
|
258
|
+
<li>
|
259
|
+
<span class='object_link'><a href="IoT/HTU21D.html" title="IoT::HTU21D (class)">HTU21D</a></span>
|
260
|
+
|
261
|
+
<small>(IoT)</small>
|
262
|
+
|
263
|
+
</li>
|
264
|
+
|
258
265
|
<li>
|
259
266
|
<span class='object_link'><a href="IoT/HumitureSensor.html" title="IoT::HumitureSensor (class)">HumitureSensor</a></span>
|
260
267
|
|
@@ -392,7 +399,7 @@
|
|
392
399
|
</div>
|
393
400
|
|
394
401
|
<div id="footer">
|
395
|
-
Generated on
|
402
|
+
Generated on Mon Jun 15 20:05:14 2020 by
|
396
403
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
397
404
|
0.9.20 (ruby-2.5.5).
|
398
405
|
</div>
|
data/doc/class_list.html
CHANGED
@@ -43,7 +43,7 @@
|
|
43
43
|
|
44
44
|
<ul id="full_list" class="class">
|
45
45
|
<li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
|
46
|
-
<li id='object_IoT' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="IoT.html" title="IoT (module)">IoT</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_IoT::Actuator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/Actuator.html" title="IoT::Actuator (class)">Actuator</a></span> < Effector<small class='search_info'>IoT</small></div></li><li id='object_IoT::BH1750' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BH1750.html" title="IoT::BH1750 (class)">BH1750</a></span> < DigitalReceptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BME280' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BME280.html" title="IoT::BME280 (class)">BME280</a></span> < BMxSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BMP280' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BMP280.html" title="IoT::BMP280 (class)">BMP280</a></span> < BMxSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BMxSensor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BMxSensor.html" title="IoT::BMxSensor (class)">BMxSensor</a></span> < HumitureSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BinaryActuator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BinaryActuator.html" title="IoT::BinaryActuator (class)">BinaryActuator</a></span> < BinaryEffector<small class='search_info'>IoT</small></div></li><li id='object_IoT::BinaryEffector' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BinaryEffector.html" title="IoT::BinaryEffector (class)">BinaryEffector</a></span> < DigitalEffector<small class='search_info'>IoT</small></div></li><li id='object_IoT::BinaryReceptor' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BinaryReceptor.html" title="IoT::BinaryReceptor (class)">BinaryReceptor</a></span> < Receptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BinarySensor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BinarySensor.html" title="IoT::BinarySensor (class)">BinarySensor</a></span> < BinaryReceptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::Button' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/Button.html" title="IoT::Button (class)">Button</a></span> < BinaryReceptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DHT11' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DHT11.html" title="IoT::DHT11 (class)">DHT11</a></span> < DHTxxSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DHT22' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DHT22.html" title="IoT::DHT22 (class)">DHT22</a></span> < DHTxxSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DHTxxSensor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DHTxxSensor.html" title="IoT::DHTxxSensor (class)">DHTxxSensor</a></span> < HumitureSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DS18B20' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DS18B20.html" title="IoT::DS18B20 (class)">DS18B20</a></span> < TemperatureSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DigitalActuator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DigitalActuator.html" title="IoT::DigitalActuator (class)">DigitalActuator</a></span> < DigitalEffector<small class='search_info'>IoT</small></div></li><li id='object_IoT::DigitalEffector' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DigitalEffector.html" title="IoT::DigitalEffector (class)">DigitalEffector</a></span> < Effector<small class='search_info'>IoT</small></div></li><li id='object_IoT::DigitalReceptor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DigitalReceptor.html" title="IoT::DigitalReceptor (class)">DigitalReceptor</a></span> < Receptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DigitalSensor' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DigitalSensor.html" title="IoT::DigitalSensor (class)">DigitalSensor</a></span> < DigitalReceptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::Effector' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/Effector.html" title="IoT::Effector (class)">Effector</a></span> < Object<small class='search_info'>IoT</small></div></li><li id='object_IoT::HCSR501' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/HCSR501.html" title="IoT::HCSR501 (class)">HCSR501</a></span> < BinarySensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::
|
46
|
+
<li id='object_IoT' class='even'><div class='item' style='padding-left:30px'><a class='toggle'></a> <span class='object_link'><a href="IoT.html" title="IoT (module)">IoT</a></span><small class='search_info'>Top Level Namespace</small></div><ul><li id='object_IoT::Actuator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/Actuator.html" title="IoT::Actuator (class)">Actuator</a></span> < Effector<small class='search_info'>IoT</small></div></li><li id='object_IoT::BH1750' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BH1750.html" title="IoT::BH1750 (class)">BH1750</a></span> < DigitalReceptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BME280' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BME280.html" title="IoT::BME280 (class)">BME280</a></span> < BMxSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BMP280' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BMP280.html" title="IoT::BMP280 (class)">BMP280</a></span> < BMxSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BMxSensor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BMxSensor.html" title="IoT::BMxSensor (class)">BMxSensor</a></span> < HumitureSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BinaryActuator' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BinaryActuator.html" title="IoT::BinaryActuator (class)">BinaryActuator</a></span> < BinaryEffector<small class='search_info'>IoT</small></div></li><li id='object_IoT::BinaryEffector' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BinaryEffector.html" title="IoT::BinaryEffector (class)">BinaryEffector</a></span> < DigitalEffector<small class='search_info'>IoT</small></div></li><li id='object_IoT::BinaryReceptor' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BinaryReceptor.html" title="IoT::BinaryReceptor (class)">BinaryReceptor</a></span> < Receptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::BinarySensor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/BinarySensor.html" title="IoT::BinarySensor (class)">BinarySensor</a></span> < BinaryReceptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::Button' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/Button.html" title="IoT::Button (class)">Button</a></span> < BinaryReceptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DHT11' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DHT11.html" title="IoT::DHT11 (class)">DHT11</a></span> < DHTxxSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DHT22' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DHT22.html" title="IoT::DHT22 (class)">DHT22</a></span> < DHTxxSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DHTxxSensor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DHTxxSensor.html" title="IoT::DHTxxSensor (class)">DHTxxSensor</a></span> < HumitureSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DS18B20' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DS18B20.html" title="IoT::DS18B20 (class)">DS18B20</a></span> < TemperatureSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DigitalActuator' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DigitalActuator.html" title="IoT::DigitalActuator (class)">DigitalActuator</a></span> < DigitalEffector<small class='search_info'>IoT</small></div></li><li id='object_IoT::DigitalEffector' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DigitalEffector.html" title="IoT::DigitalEffector (class)">DigitalEffector</a></span> < Effector<small class='search_info'>IoT</small></div></li><li id='object_IoT::DigitalReceptor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DigitalReceptor.html" title="IoT::DigitalReceptor (class)">DigitalReceptor</a></span> < Receptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::DigitalSensor' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/DigitalSensor.html" title="IoT::DigitalSensor (class)">DigitalSensor</a></span> < DigitalReceptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::Effector' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/Effector.html" title="IoT::Effector (class)">Effector</a></span> < Object<small class='search_info'>IoT</small></div></li><li id='object_IoT::HCSR501' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/HCSR501.html" title="IoT::HCSR501 (class)">HCSR501</a></span> < BinarySensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::HTU21D' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/HTU21D.html" title="IoT::HTU21D (class)">HTU21D</a></span> < HumitureSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::HumitureSensor' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/HumitureSensor.html" title="IoT::HumitureSensor (class)">HumitureSensor</a></span> < TemperatureSensor<small class='search_info'>IoT</small></div></li><li id='object_IoT::LED' class='collapsed odd'><div class='item' style='padding-left:45px'><a class='toggle'></a> <span class='object_link'><a href="IoT/LED.html" title="IoT::LED (class)">LED</a></span> < BinaryEffector<small class='search_info'>IoT</small></div><ul><li id='object_IoT::LED::PWM' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="IoT/LED/PWM.html" title="IoT::LED::PWM (class)">PWM</a></span> < Object<small class='search_info'>IoT::LED</small></div></li><li id='object_IoT::LED::RGB' class='collapsed'><div class='item' style='padding-left:60px'><span class='object_link'><a href="IoT/LED/RGB.html" title="IoT::LED::RGB (class)">RGB</a></span> < DigitalEffector<small class='search_info'>IoT::LED</small></div></li></ul></li><li id='object_IoT::MAX44009' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/MAX44009.html" title="IoT::MAX44009 (class)">MAX44009</a></span> < Object<small class='search_info'>IoT</small></div></li><li id='object_IoT::Receptor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/Receptor.html" title="IoT::Receptor (class)">Receptor</a></span> < Object<small class='search_info'>IoT</small></div></li><li id='object_IoT::Sensor' class='collapsed even'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/Sensor.html" title="IoT::Sensor (class)">Sensor</a></span> < Receptor<small class='search_info'>IoT</small></div></li><li id='object_IoT::TemperatureSensor' class='collapsed odd'><div class='item' style='padding-left:45px'><span class='object_link'><a href="IoT/TemperatureSensor.html" title="IoT::TemperatureSensor (class)">TemperatureSensor</a></span> < DigitalSensor<small class='search_info'>IoT</small></div></li></ul></li><li id='object_RaspberryPiIoT' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="RaspberryPiIoT.html" title="RaspberryPiIoT (module)">RaspberryPiIoT</a></span><small class='search_info'>Top Level Namespace</small></div></li>
|
47
47
|
|
48
48
|
</ul>
|
49
49
|
</div>
|
data/doc/file.LICENSE.html
CHANGED
@@ -82,7 +82,7 @@ DEALINGS IN THE SOFTWARE.
|
|
82
82
|
</div></div>
|
83
83
|
|
84
84
|
<div id="footer">
|
85
|
-
Generated on
|
85
|
+
Generated on Mon Jun 15 20:05:15 2020 by
|
86
86
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
87
87
|
0.9.20 (ruby-2.5.5).
|
88
88
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -68,6 +68,9 @@ it’s such a fun to do physical programming! But I love to program in Ruby.
|
|
68
68
|
So I tried to make a pragmatic set of useful IoT libraries for the Ruby language
|
69
69
|
for all who want to program for Raspberry Pi in Ruby.</p>
|
70
70
|
|
71
|
+
<p>This gem is an interfacing library for other Ruby gems that work with different devices
|
72
|
+
on SBCs of Raspberry Pi family.</p>
|
73
|
+
|
71
74
|
<p>I taught sachoolchildren in a Raspberry Pi Code Club to write OO-programs that
|
72
75
|
interact with physical devices. And I found Ruby to be a very effective tool
|
73
76
|
in teaching IoT programming.</p>
|
@@ -77,33 +80,35 @@ in teaching IoT programming.
|
|
77
80
|
<p>To use this library you should do:</p>
|
78
81
|
|
79
82
|
<ol>
|
83
|
+
<li>Install the Ruby development version (to compile the extensions):
|
84
|
+
<code>
|
85
|
+
sudo apt-get install ruby-dev
|
86
|
+
</code></li>
|
80
87
|
<li>
|
81
|
-
<p>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
<p>cd bcm2835-1.58</p>
|
93
|
-
|
94
|
-
<p>./configure</p>
|
95
|
-
|
96
|
-
<p>make</p>
|
97
|
-
|
98
|
-
<p>sudo make check</p>
|
99
|
-
|
100
|
-
<p>sudo make install</p>
|
88
|
+
<p>Download and install the bcm2835-1.xx.tar.gz library, e. g.:
|
89
|
+
```
|
90
|
+
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.58.tar.gz</p>
|
91
|
+
|
92
|
+
<p>tar zxvf bcm2835-1.58.tar.gz
|
93
|
+
cd bcm2835-1.58
|
94
|
+
./configure
|
95
|
+
make
|
96
|
+
sudo make check
|
97
|
+
sudo make install
|
98
|
+
```</p>
|
101
99
|
</li>
|
102
100
|
<li>
|
103
|
-
<p>
|
101
|
+
<p>For some external gems additional libraries should be installed.</p>
|
104
102
|
|
105
|
-
<p>gem
|
103
|
+
<p>a) to use output on a SSD1306 display with the help of the ‘SSD1306’ gem you’ll need to
|
104
|
+
<code>
|
105
|
+
sudo apt-get install libmagickwand-dev
|
106
|
+
</code></p>
|
106
107
|
</li>
|
108
|
+
<li>Install the latest version of gem:
|
109
|
+
<code>
|
110
|
+
gem install raspberry_pi_iot
|
111
|
+
</code></li>
|
107
112
|
</ol>
|
108
113
|
|
109
114
|
<h2 id="usage">Usage</h2>
|
@@ -115,13 +120,13 @@ Samples of usage can be run in the demo/ sub-directory.
|
|
115
120
|
|
116
121
|
<ul>
|
117
122
|
<li>
|
118
|
-
<p>Support for more devices (I2C, SPI, LED strip & matrix), SenseHAT, Official Display (brightness, orientation).</p>
|
123
|
+
<p>Support for <a href="./supported_devices.md">more devices</a> (I2C, SPI, LED strip & matrix), SenseHAT, Official Display (brightness, orientation).</p>
|
119
124
|
</li>
|
120
125
|
<li>
|
121
126
|
<p>Better functionality for existing classes (Button, LED, etc.)</p>
|
122
127
|
</li>
|
123
128
|
<li>
|
124
|
-
<p>More tests.</p>
|
129
|
+
<p>More tests and demos.</p>
|
125
130
|
</li>
|
126
131
|
</ul>
|
127
132
|
|
@@ -135,7 +140,7 @@ Samples of usage can be run in the demo/ sub-directory.
|
|
135
140
|
</div></div>
|
136
141
|
|
137
142
|
<div id="footer">
|
138
|
-
Generated on
|
143
|
+
Generated on Mon Jun 15 20:05:15 2020 by
|
139
144
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
145
|
0.9.20 (ruby-2.5.5).
|
141
146
|
</div>
|
data/doc/index.html
CHANGED
@@ -68,6 +68,9 @@ it’s such a fun to do physical programming! But I love to program in Ruby.
|
|
68
68
|
So I tried to make a pragmatic set of useful IoT libraries for the Ruby language
|
69
69
|
for all who want to program for Raspberry Pi in Ruby.</p>
|
70
70
|
|
71
|
+
<p>This gem is an interfacing library for other Ruby gems that work with different devices
|
72
|
+
on SBCs of Raspberry Pi family.</p>
|
73
|
+
|
71
74
|
<p>I taught sachoolchildren in a Raspberry Pi Code Club to write OO-programs that
|
72
75
|
interact with physical devices. And I found Ruby to be a very effective tool
|
73
76
|
in teaching IoT programming.</p>
|
@@ -77,33 +80,35 @@ in teaching IoT programming.
|
|
77
80
|
<p>To use this library you should do:</p>
|
78
81
|
|
79
82
|
<ol>
|
83
|
+
<li>Install the Ruby development version (to compile the extensions):
|
84
|
+
<code>
|
85
|
+
sudo apt-get install ruby-dev
|
86
|
+
</code></li>
|
80
87
|
<li>
|
81
|
-
<p>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
<p>cd bcm2835-1.58</p>
|
93
|
-
|
94
|
-
<p>./configure</p>
|
95
|
-
|
96
|
-
<p>make</p>
|
97
|
-
|
98
|
-
<p>sudo make check</p>
|
99
|
-
|
100
|
-
<p>sudo make install</p>
|
88
|
+
<p>Download and install the bcm2835-1.xx.tar.gz library, e. g.:
|
89
|
+
```
|
90
|
+
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.58.tar.gz</p>
|
91
|
+
|
92
|
+
<p>tar zxvf bcm2835-1.58.tar.gz
|
93
|
+
cd bcm2835-1.58
|
94
|
+
./configure
|
95
|
+
make
|
96
|
+
sudo make check
|
97
|
+
sudo make install
|
98
|
+
```</p>
|
101
99
|
</li>
|
102
100
|
<li>
|
103
|
-
<p>
|
101
|
+
<p>For some external gems additional libraries should be installed.</p>
|
104
102
|
|
105
|
-
<p>gem
|
103
|
+
<p>a) to use output on a SSD1306 display with the help of the ‘SSD1306’ gem you’ll need to
|
104
|
+
<code>
|
105
|
+
sudo apt-get install libmagickwand-dev
|
106
|
+
</code></p>
|
106
107
|
</li>
|
108
|
+
<li>Install the latest version of gem:
|
109
|
+
<code>
|
110
|
+
gem install raspberry_pi_iot
|
111
|
+
</code></li>
|
107
112
|
</ol>
|
108
113
|
|
109
114
|
<h2 id="usage">Usage</h2>
|
@@ -115,13 +120,13 @@ Samples of usage can be run in the demo/ sub-directory.
|
|
115
120
|
|
116
121
|
<ul>
|
117
122
|
<li>
|
118
|
-
<p>Support for more devices (I2C, SPI, LED strip & matrix), SenseHAT, Official Display (brightness, orientation).</p>
|
123
|
+
<p>Support for <a href="./supported_devices.md">more devices</a> (I2C, SPI, LED strip & matrix), SenseHAT, Official Display (brightness, orientation).</p>
|
119
124
|
</li>
|
120
125
|
<li>
|
121
126
|
<p>Better functionality for existing classes (Button, LED, etc.)</p>
|
122
127
|
</li>
|
123
128
|
<li>
|
124
|
-
<p>More tests.</p>
|
129
|
+
<p>More tests and demos.</p>
|
125
130
|
</li>
|
126
131
|
</ul>
|
127
132
|
|
@@ -135,7 +140,7 @@ Samples of usage can be run in the demo/ sub-directory.
|
|
135
140
|
</div></div>
|
136
141
|
|
137
142
|
<div id="footer">
|
138
|
-
Generated on
|
143
|
+
Generated on Mon Jun 15 20:05:14 2020 by
|
139
144
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
145
|
0.9.20 (ruby-2.5.5).
|
141
146
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -229,6 +229,14 @@
|
|
229
229
|
|
230
230
|
|
231
231
|
<li class="even ">
|
232
|
+
<div class="item">
|
233
|
+
<span class='object_link'><a href="IoT/HTU21D.html#initialize-instance_method" title="IoT::HTU21D#initialize (method)">#initialize</a></span>
|
234
|
+
<small>IoT::HTU21D</small>
|
235
|
+
</div>
|
236
|
+
</li>
|
237
|
+
|
238
|
+
|
239
|
+
<li class="odd ">
|
232
240
|
<div class="item">
|
233
241
|
<span class='object_link'><a href="IoT/HumitureSensor.html#initialize-instance_method" title="IoT::HumitureSensor#initialize (method)">#initialize</a></span>
|
234
242
|
<small>IoT::HumitureSensor</small>
|
@@ -236,7 +244,7 @@
|
|
236
244
|
</li>
|
237
245
|
|
238
246
|
|
239
|
-
<li class="
|
247
|
+
<li class="even ">
|
240
248
|
<div class="item">
|
241
249
|
<span class='object_link'><a href="IoT/LED.html#initialize-instance_method" title="IoT::LED#initialize (method)">#initialize</a></span>
|
242
250
|
<small>IoT::LED</small>
|
@@ -244,7 +252,7 @@
|
|
244
252
|
</li>
|
245
253
|
|
246
254
|
|
247
|
-
<li class="
|
255
|
+
<li class="odd ">
|
248
256
|
<div class="item">
|
249
257
|
<span class='object_link'><a href="IoT/LED/RGB.html#initialize-instance_method" title="IoT::LED::RGB#initialize (method)">#initialize</a></span>
|
250
258
|
<small>IoT::LED::RGB</small>
|
@@ -252,7 +260,7 @@
|
|
252
260
|
</li>
|
253
261
|
|
254
262
|
|
255
|
-
<li class="
|
263
|
+
<li class="even ">
|
256
264
|
<div class="item">
|
257
265
|
<span class='object_link'><a href="IoT/MAX44009.html#initialize-instance_method" title="IoT::MAX44009#initialize (method)">#initialize</a></span>
|
258
266
|
<small>IoT::MAX44009</small>
|
@@ -260,7 +268,7 @@
|
|
260
268
|
</li>
|
261
269
|
|
262
270
|
|
263
|
-
<li class="
|
271
|
+
<li class="odd ">
|
264
272
|
<div class="item">
|
265
273
|
<span class='object_link'><a href="IoT/Receptor.html#initialize-instance_method" title="IoT::Receptor#initialize (method)">#initialize</a></span>
|
266
274
|
<small>IoT::Receptor</small>
|
@@ -268,7 +276,7 @@
|
|
268
276
|
</li>
|
269
277
|
|
270
278
|
|
271
|
-
<li class="
|
279
|
+
<li class="even ">
|
272
280
|
<div class="item">
|
273
281
|
<span class='object_link'><a href="IoT/TemperatureSensor.html#initialize-instance_method" title="IoT::TemperatureSensor#initialize (method)">#initialize</a></span>
|
274
282
|
<small>IoT::TemperatureSensor</small>
|
@@ -276,7 +284,7 @@
|
|
276
284
|
</li>
|
277
285
|
|
278
286
|
|
279
|
-
<li class="
|
287
|
+
<li class="odd ">
|
280
288
|
<div class="item">
|
281
289
|
<span class='object_link'><a href="IoT/TemperatureSensor.html#kelvin-instance_method" title="IoT::TemperatureSensor#kelvin (method)">#kelvin</a></span>
|
282
290
|
<small>IoT::TemperatureSensor</small>
|
@@ -284,7 +292,7 @@
|
|
284
292
|
</li>
|
285
293
|
|
286
294
|
|
287
|
-
<li class="
|
295
|
+
<li class="even ">
|
288
296
|
<div class="item">
|
289
297
|
<span class='object_link'><a href="IoT/Button.html#long_press%3F-instance_method" title="IoT::Button#long_press? (method)">#long_press?</a></span>
|
290
298
|
<small>IoT::Button</small>
|
@@ -292,7 +300,7 @@
|
|
292
300
|
</li>
|
293
301
|
|
294
302
|
|
295
|
-
<li class="
|
303
|
+
<li class="odd ">
|
296
304
|
<div class="item">
|
297
305
|
<span class='object_link'><a href="IoT/BinaryReceptor.html#low%3F-instance_method" title="IoT::BinaryReceptor#low? (method)">#low?</a></span>
|
298
306
|
<small>IoT::BinaryReceptor</small>
|
@@ -300,7 +308,7 @@
|
|
300
308
|
</li>
|
301
309
|
|
302
310
|
|
303
|
-
<li class="
|
311
|
+
<li class="even ">
|
304
312
|
<div class="item">
|
305
313
|
<span class='object_link'><a href="IoT/BH1750.html#lux-instance_method" title="IoT::BH1750#lux (method)">#lux</a></span>
|
306
314
|
<small>IoT::BH1750</small>
|
@@ -308,7 +316,7 @@
|
|
308
316
|
</li>
|
309
317
|
|
310
318
|
|
311
|
-
<li class="
|
319
|
+
<li class="odd ">
|
312
320
|
<div class="item">
|
313
321
|
<span class='object_link'><a href="IoT/MAX44009.html#lux-instance_method" title="IoT::MAX44009#lux (method)">#lux</a></span>
|
314
322
|
<small>IoT::MAX44009</small>
|
@@ -316,7 +324,7 @@
|
|
316
324
|
</li>
|
317
325
|
|
318
326
|
|
319
|
-
<li class="
|
327
|
+
<li class="even ">
|
320
328
|
<div class="item">
|
321
329
|
<span class='object_link'><a href="IoT/Effector.html#model_name-instance_method" title="IoT::Effector#model_name (method)">#model_name</a></span>
|
322
330
|
<small>IoT::Effector</small>
|
@@ -324,7 +332,7 @@
|
|
324
332
|
</li>
|
325
333
|
|
326
334
|
|
327
|
-
<li class="
|
335
|
+
<li class="odd ">
|
328
336
|
<div class="item">
|
329
337
|
<span class='object_link'><a href="IoT/Receptor.html#model_name-instance_method" title="IoT::Receptor#model_name (method)">#model_name</a></span>
|
330
338
|
<small>IoT::Receptor</small>
|
@@ -332,7 +340,7 @@
|
|
332
340
|
</li>
|
333
341
|
|
334
342
|
|
335
|
-
<li class="
|
343
|
+
<li class="even ">
|
336
344
|
<div class="item">
|
337
345
|
<span class='object_link'><a href="IoT/BH1750.html#name-instance_method" title="IoT::BH1750#name (method)">#name</a></span>
|
338
346
|
<small>IoT::BH1750</small>
|
@@ -340,7 +348,7 @@
|
|
340
348
|
</li>
|
341
349
|
|
342
350
|
|
343
|
-
<li class="
|
351
|
+
<li class="odd ">
|
344
352
|
<div class="item">
|
345
353
|
<span class='object_link'><a href="IoT/BMxSensor.html#name-instance_method" title="IoT::BMxSensor#name (method)">#name</a></span>
|
346
354
|
<small>IoT::BMxSensor</small>
|
@@ -348,7 +356,7 @@
|
|
348
356
|
</li>
|
349
357
|
|
350
358
|
|
351
|
-
<li class="
|
359
|
+
<li class="even ">
|
352
360
|
<div class="item">
|
353
361
|
<span class='object_link'><a href="IoT/Button.html#name-instance_method" title="IoT::Button#name (method)">#name</a></span>
|
354
362
|
<small>IoT::Button</small>
|
@@ -356,7 +364,7 @@
|
|
356
364
|
</li>
|
357
365
|
|
358
366
|
|
359
|
-
<li class="
|
367
|
+
<li class="odd ">
|
360
368
|
<div class="item">
|
361
369
|
<span class='object_link'><a href="IoT/DHTxxSensor.html#name-instance_method" title="IoT::DHTxxSensor#name (method)">#name</a></span>
|
362
370
|
<small>IoT::DHTxxSensor</small>
|
@@ -364,7 +372,7 @@
|
|
364
372
|
</li>
|
365
373
|
|
366
374
|
|
367
|
-
<li class="
|
375
|
+
<li class="even ">
|
368
376
|
<div class="item">
|
369
377
|
<span class='object_link'><a href="IoT/Effector.html#name-instance_method" title="IoT::Effector#name (method)">#name</a></span>
|
370
378
|
<small>IoT::Effector</small>
|
@@ -372,6 +380,14 @@
|
|
372
380
|
</li>
|
373
381
|
|
374
382
|
|
383
|
+
<li class="odd ">
|
384
|
+
<div class="item">
|
385
|
+
<span class='object_link'><a href="IoT/HTU21D.html#name-instance_method" title="IoT::HTU21D#name (method)">#name</a></span>
|
386
|
+
<small>IoT::HTU21D</small>
|
387
|
+
</div>
|
388
|
+
</li>
|
389
|
+
|
390
|
+
|
375
391
|
<li class="even ">
|
376
392
|
<div class="item">
|
377
393
|
<span class='object_link'><a href="IoT/MAX44009.html#name-instance_method" title="IoT::MAX44009#name (method)">#name</a></span>
|
@@ -557,6 +573,14 @@
|
|
557
573
|
|
558
574
|
|
559
575
|
<li class="odd ">
|
576
|
+
<div class="item">
|
577
|
+
<span class='object_link'><a href="IoT/HTU21D.html#read_data-instance_method" title="IoT::HTU21D#read_data (method)">#read_data</a></span>
|
578
|
+
<small>IoT::HTU21D</small>
|
579
|
+
</div>
|
580
|
+
</li>
|
581
|
+
|
582
|
+
|
583
|
+
<li class="even ">
|
560
584
|
<div class="item">
|
561
585
|
<span class='object_link'><a href="IoT/HumitureSensor.html#read_data-instance_method" title="IoT::HumitureSensor#read_data (method)">#read_data</a></span>
|
562
586
|
<small>IoT::HumitureSensor</small>
|
@@ -564,7 +588,7 @@
|
|
564
588
|
</li>
|
565
589
|
|
566
590
|
|
567
|
-
<li class="
|
591
|
+
<li class="odd ">
|
568
592
|
<div class="item">
|
569
593
|
<span class='object_link'><a href="IoT/TemperatureSensor.html#read_data-instance_method" title="IoT::TemperatureSensor#read_data (method)">#read_data</a></span>
|
570
594
|
<small>IoT::TemperatureSensor</small>
|
@@ -572,7 +596,7 @@
|
|
572
596
|
</li>
|
573
597
|
|
574
598
|
|
575
|
-
<li class="
|
599
|
+
<li class="even ">
|
576
600
|
<div class="item">
|
577
601
|
<span class='object_link'><a href="IoT/MAX44009.html#read_sensor-instance_method" title="IoT::MAX44009#read_sensor (method)">#read_sensor</a></span>
|
578
602
|
<small>IoT::MAX44009</small>
|
@@ -580,7 +604,7 @@
|
|
580
604
|
</li>
|
581
605
|
|
582
606
|
|
583
|
-
<li class="
|
607
|
+
<li class="odd ">
|
584
608
|
<div class="item">
|
585
609
|
<span class='object_link'><a href="IoT/TemperatureSensor.html#reaumur-instance_method" title="IoT::TemperatureSensor#reaumur (method)">#reaumur</a></span>
|
586
610
|
<small>IoT::TemperatureSensor</small>
|
@@ -588,7 +612,7 @@
|
|
588
612
|
</li>
|
589
613
|
|
590
614
|
|
591
|
-
<li class="
|
615
|
+
<li class="even ">
|
592
616
|
<div class="item">
|
593
617
|
<span class='object_link'><a href="IoT/Button.html#set_timeout-instance_method" title="IoT::Button#set_timeout (method)">#set_timeout</a></span>
|
594
618
|
<small>IoT::Button</small>
|
@@ -596,7 +620,7 @@
|
|
596
620
|
</li>
|
597
621
|
|
598
622
|
|
599
|
-
<li class="
|
623
|
+
<li class="odd ">
|
600
624
|
<div class="item">
|
601
625
|
<span class='object_link'><a href="IoT/Button.html#single_press%3F-instance_method" title="IoT::Button#single_press? (method)">#single_press?</a></span>
|
602
626
|
<small>IoT::Button</small>
|
@@ -604,7 +628,7 @@
|
|
604
628
|
</li>
|
605
629
|
|
606
630
|
|
607
|
-
<li class="
|
631
|
+
<li class="even ">
|
608
632
|
<div class="item">
|
609
633
|
<span class='object_link'><a href="IoT/TemperatureSensor.html#temperature-instance_method" title="IoT::TemperatureSensor#temperature (method)">#temperature</a></span>
|
610
634
|
<small>IoT::TemperatureSensor</small>
|
@@ -612,7 +636,7 @@
|
|
612
636
|
</li>
|
613
637
|
|
614
638
|
|
615
|
-
<li class="
|
639
|
+
<li class="odd ">
|
616
640
|
<div class="item">
|
617
641
|
<span class='object_link'><a href="IoT/Button.html#timeout%3F-instance_method" title="IoT::Button#timeout? (method)">#timeout?</a></span>
|
618
642
|
<small>IoT::Button</small>
|
@@ -620,7 +644,7 @@
|
|
620
644
|
</li>
|
621
645
|
|
622
646
|
|
623
|
-
<li class="
|
647
|
+
<li class="even ">
|
624
648
|
<div class="item">
|
625
649
|
<span class='object_link'><a href="IoT/BMxSensor.html#to_s-instance_method" title="IoT::BMxSensor#to_s (method)">#to_s</a></span>
|
626
650
|
<small>IoT::BMxSensor</small>
|
@@ -628,7 +652,7 @@
|
|
628
652
|
</li>
|
629
653
|
|
630
654
|
|
631
|
-
<li class="
|
655
|
+
<li class="odd ">
|
632
656
|
<div class="item">
|
633
657
|
<span class='object_link'><a href="IoT/HumitureSensor.html#to_s-instance_method" title="IoT::HumitureSensor#to_s (method)">#to_s</a></span>
|
634
658
|
<small>IoT::HumitureSensor</small>
|
@@ -636,7 +660,7 @@
|
|
636
660
|
</li>
|
637
661
|
|
638
662
|
|
639
|
-
<li class="
|
663
|
+
<li class="even ">
|
640
664
|
<div class="item">
|
641
665
|
<span class='object_link'><a href="IoT/TemperatureSensor.html#to_s-instance_method" title="IoT::TemperatureSensor#to_s (method)">#to_s</a></span>
|
642
666
|
<small>IoT::TemperatureSensor</small>
|
@@ -644,7 +668,7 @@
|
|
644
668
|
</li>
|
645
669
|
|
646
670
|
|
647
|
-
<li class="
|
671
|
+
<li class="odd ">
|
648
672
|
<div class="item">
|
649
673
|
<span class='object_link'><a href="IoT/Button.html#triple_press%3F-instance_method" title="IoT::Button#triple_press? (method)">#triple_press?</a></span>
|
650
674
|
<small>IoT::Button</small>
|
@@ -652,7 +676,7 @@
|
|
652
676
|
</li>
|
653
677
|
|
654
678
|
|
655
|
-
<li class="
|
679
|
+
<li class="even ">
|
656
680
|
<div class="item">
|
657
681
|
<span class='object_link'><a href="IoT/Button.html#wait_for_press-instance_method" title="IoT::Button#wait_for_press (method)">#wait_for_press</a></span>
|
658
682
|
<small>IoT::Button</small>
|
@@ -660,7 +684,7 @@
|
|
660
684
|
</li>
|
661
685
|
|
662
686
|
|
663
|
-
<li class="
|
687
|
+
<li class="odd ">
|
664
688
|
<div class="item">
|
665
689
|
<span class='object_link'><a href="IoT/Button.html#wait_for_presses-instance_method" title="IoT::Button#wait_for_presses (method)">#wait_for_presses</a></span>
|
666
690
|
<small>IoT::Button</small>
|
@@ -668,7 +692,7 @@
|
|
668
692
|
</li>
|
669
693
|
|
670
694
|
|
671
|
-
<li class="
|
695
|
+
<li class="even ">
|
672
696
|
<div class="item">
|
673
697
|
<span class='object_link'><a href="IoT/Button.html#was_not_pressed%3F-instance_method" title="IoT::Button#was_not_pressed? (method)">#was_not_pressed?</a></span>
|
674
698
|
<small>IoT::Button</small>
|
@@ -676,7 +700,7 @@
|
|
676
700
|
</li>
|
677
701
|
|
678
702
|
|
679
|
-
<li class="
|
703
|
+
<li class="odd ">
|
680
704
|
<div class="item">
|
681
705
|
<span class='object_link'><a href="IoT/Button.html#was_pressed%3F-instance_method" title="IoT::Button#was_pressed? (method)">#was_pressed?</a></span>
|
682
706
|
<small>IoT::Button</small>
|
@@ -684,7 +708,7 @@
|
|
684
708
|
</li>
|
685
709
|
|
686
710
|
|
687
|
-
<li class="
|
711
|
+
<li class="even ">
|
688
712
|
<div class="item">
|
689
713
|
<span class='object_link'><a href="IoT/MAX44009.html#write_config-instance_method" title="IoT::MAX44009#write_config (method)">#write_config</a></span>
|
690
714
|
<small>IoT::MAX44009</small>
|
@@ -692,7 +716,7 @@
|
|
692
716
|
</li>
|
693
717
|
|
694
718
|
|
695
|
-
<li class="
|
719
|
+
<li class="odd ">
|
696
720
|
<div class="item">
|
697
721
|
<span class='object_link'><a href="IoT/LED.html#%D0%B2%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C-instance_method" title="IoT::LED#включить (method)">#включить</a></span>
|
698
722
|
<small>IoT::LED</small>
|
@@ -700,7 +724,7 @@
|
|
700
724
|
</li>
|
701
725
|
|
702
726
|
|
703
|
-
<li class="
|
727
|
+
<li class="even ">
|
704
728
|
<div class="item">
|
705
729
|
<span class='object_link'><a href="IoT/LED.html#%D0%B2%D1%8B%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C-instance_method" title="IoT::LED#выключить (method)">#выключить</a></span>
|
706
730
|
<small>IoT::LED</small>
|
@@ -708,7 +732,7 @@
|
|
708
732
|
</li>
|
709
733
|
|
710
734
|
|
711
|
-
<li class="
|
735
|
+
<li class="odd ">
|
712
736
|
<div class="item">
|
713
737
|
<span class='object_link'><a href="IoT/LED.html#%D0%BC%D0%B8%D0%B3%D0%B0%D1%82%D1%8C-instance_method" title="IoT::LED#мигать (method)">#мигать</a></span>
|
714
738
|
<small>IoT::LED</small>
|
@@ -716,7 +740,7 @@
|
|
716
740
|
</li>
|
717
741
|
|
718
742
|
|
719
|
-
<li class="
|
743
|
+
<li class="even ">
|
720
744
|
<div class="item">
|
721
745
|
<span class='object_link'><a href="IoT/LED.html#%D1%81%D0%BE%D0%B7%D0%B4%D0%B0%D1%82%D1%8C-class_method" title="IoT::LED.создать (method)">создать</a></span>
|
722
746
|
<small>IoT::LED</small>
|
@@ -100,7 +100,7 @@
|
|
100
100
|
</div>
|
101
101
|
|
102
102
|
<div id="footer">
|
103
|
-
Generated on
|
103
|
+
Generated on Mon Jun 15 20:05:15 2020 by
|
104
104
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
105
105
|
0.9.20 (ruby-2.5.5).
|
106
106
|
</div>
|
data/lib/iot/htu21d.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'i2c/i2c'
|
2
|
+
require_relative 'humiture_sensor'
|
3
|
+
|
4
|
+
module IoT
|
5
|
+
# HTU21D - relative humidity and temperature digital senspr
|
6
|
+
class HTU21D < IoT::HumitureSensor # inspired by https://github.com/leon-anavi/rpi-examples/HTU21D
|
7
|
+
I2C_ADDR = 0x40
|
8
|
+
CMD_TRIG_TEMP_HM = 0xE3
|
9
|
+
CMD_TRIG_HUMID_HM = 0xE5
|
10
|
+
CMD_TRIG_TEMP_NHM = 0xF3
|
11
|
+
CMD_TRIG_HUMID_NHM = 0xF5
|
12
|
+
CMD_WRITE_USER_REG = 0xE6
|
13
|
+
CMD_READ_USER_REG = 0xE7
|
14
|
+
CMD_RESET = 0xFE
|
15
|
+
|
16
|
+
def initialize(device_address=I2C_ADDR, bus_number=1)
|
17
|
+
@sensor_name = 'HTU21D'
|
18
|
+
@device_address = device_address
|
19
|
+
|
20
|
+
@buffer_size = 3
|
21
|
+
@device = ::I2C.create("/dev/i2c-#{bus_number}")
|
22
|
+
@device.write(I2C_ADDR, CMD_RESET)
|
23
|
+
@temperature, @humidity = read_data
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
# Read values by 'DhtSensor.read' from 'dht-sensor-ffi'
|
28
|
+
def read_data
|
29
|
+
@temperature = t
|
30
|
+
@humidity = h
|
31
|
+
[@temperature, @humidity]
|
32
|
+
end
|
33
|
+
|
34
|
+
def name
|
35
|
+
@sensor_name
|
36
|
+
end
|
37
|
+
private
|
38
|
+
def t
|
39
|
+
@device.write(I2C_ADDR, CMD_TRIG_TEMP_NHM)
|
40
|
+
delay 100
|
41
|
+
buffer = @device.read(I2C_ADDR, @buffer_size)
|
42
|
+
# STDERR.printf "%s\n", buffer.each_byte.map { |b| b.to_s(16) }.join
|
43
|
+
raw = (buffer[0].ord << 8 | buffer[1].ord) & 0xFFFC
|
44
|
+
value = raw / 65536.0
|
45
|
+
@temperature = -46.85 + (175.72 * value) # See page 14 of the datasheet
|
46
|
+
end
|
47
|
+
|
48
|
+
def h
|
49
|
+
@device.write(I2C_ADDR, CMD_TRIG_HUMID_NHM)
|
50
|
+
delay 100
|
51
|
+
buffer = @device.read(I2C_ADDR, @buffer_size)
|
52
|
+
# STDERR.printf "%s\n", buffer.each_byte.map { |b| b.to_s(16) }.join
|
53
|
+
raw = (buffer[0].ord << 8 | buffer[1].ord) & 0xFFFC
|
54
|
+
value = raw / 65536.0
|
55
|
+
@humidity = -6.0 + (125.0 * value) # See page 15 of the datasheet
|
56
|
+
end
|
57
|
+
|
58
|
+
def delay(ms=100)
|
59
|
+
sleep 0.001*ms
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/test/test.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
=== test_bh1750.rb ===============================================
|
2
|
-
Run options: --seed
|
2
|
+
Run options: --seed 2043
|
3
3
|
|
4
4
|
# Running:
|
5
5
|
|
6
6
|
....
|
7
7
|
|
8
|
-
Finished in 0.
|
8
|
+
Finished in 0.028173s, 141.9806 runs/s, 141.9806 assertions/s.
|
9
9
|
|
10
10
|
4 runs, 4 assertions, 0 failures, 0 errors, 0 skips
|
11
11
|
-----------------------------------------------------------------
|
12
12
|
=== test_bme280.rb ===============================================
|
13
|
-
Run options: --seed
|
13
|
+
Run options: --seed 22075
|
14
14
|
|
15
15
|
# Running:
|
16
16
|
|
17
17
|
F..
|
18
18
|
|
19
|
-
Finished in 0.
|
19
|
+
Finished in 0.038072s, 78.7989 runs/s, 315.1957 assertions/s.
|
20
20
|
|
21
21
|
1) Failure:
|
22
22
|
RaspberryPiIoT_BMP280Test#test_humidity_value [./test_bme280.rb:55]:
|
@@ -25,149 +25,160 @@ Expected false to be truthy.
|
|
25
25
|
3 runs, 12 assertions, 1 failures, 0 errors, 0 skips
|
26
26
|
-----------------------------------------------------------------
|
27
27
|
=== test_bmp280.rb ===============================================
|
28
|
-
Run options: --seed
|
28
|
+
Run options: --seed 52806
|
29
29
|
|
30
30
|
# Running:
|
31
31
|
|
32
32
|
..
|
33
33
|
|
34
|
-
Finished in 0.
|
34
|
+
Finished in 0.031242s, 64.0161 runs/s, 352.0887 assertions/s.
|
35
35
|
|
36
36
|
2 runs, 11 assertions, 0 failures, 0 errors, 0 skips
|
37
37
|
-----------------------------------------------------------------
|
38
38
|
=== test_button.rb ===============================================
|
39
|
-
Run options: --seed
|
39
|
+
Run options: --seed 57870
|
40
40
|
|
41
41
|
# Running:
|
42
42
|
|
43
|
-
Waiting for
|
43
|
+
Waiting for a press...
|
44
|
+
.Waiting for 1 short press (< 1 second)...
|
44
45
|
.Waiting for double press (2 sequential short presses)...
|
45
|
-
.Waiting for a press...
|
46
46
|
.Waiting for 1 long press (> 1 second)...
|
47
47
|
.
|
48
48
|
|
49
|
-
Finished in 60.
|
49
|
+
Finished in 60.037097s, 0.0666 runs/s, 0.0333 assertions/s.
|
50
50
|
|
51
51
|
4 runs, 2 assertions, 0 failures, 0 errors, 0 skips
|
52
52
|
-----------------------------------------------------------------
|
53
53
|
=== test_dht11.rb ===============================================
|
54
|
-
Run options: --seed
|
54
|
+
Run options: --seed 52868
|
55
55
|
|
56
56
|
# Running:
|
57
57
|
|
58
58
|
..
|
59
59
|
|
60
|
-
Finished in 0.
|
60
|
+
Finished in 0.953000s, 2.0986 runs/s, 5.2466 assertions/s.
|
61
61
|
|
62
62
|
2 runs, 5 assertions, 0 failures, 0 errors, 0 skips
|
63
63
|
-----------------------------------------------------------------
|
64
64
|
=== test_dht22.rb ===============================================
|
65
|
-
Run options: --seed
|
65
|
+
Run options: --seed 1665
|
66
66
|
|
67
67
|
# Running:
|
68
68
|
|
69
69
|
..
|
70
70
|
|
71
|
-
Finished in 0.
|
71
|
+
Finished in 0.953430s, 2.0977 runs/s, 5.2442 assertions/s.
|
72
72
|
|
73
73
|
2 runs, 5 assertions, 0 failures, 0 errors, 0 skips
|
74
74
|
-----------------------------------------------------------------
|
75
75
|
=== test_ds18b20.rb ===============================================
|
76
|
-
Run options: --seed
|
76
|
+
Run options: --seed 35331
|
77
77
|
|
78
78
|
# Running:
|
79
79
|
|
80
80
|
.
|
81
81
|
|
82
|
-
Finished in 0.
|
82
|
+
Finished in 0.902606s, 1.1079 runs/s, 4.4316 assertions/s.
|
83
83
|
|
84
84
|
1 runs, 4 assertions, 0 failures, 0 errors, 0 skips
|
85
85
|
-----------------------------------------------------------------
|
86
86
|
=== test_helper.rb ===============================================
|
87
|
-
Run options: --seed
|
87
|
+
Run options: --seed 19152
|
88
88
|
|
89
89
|
# Running:
|
90
90
|
|
91
91
|
|
92
92
|
|
93
|
-
Finished in 0.
|
93
|
+
Finished in 0.001872s, 0.0000 runs/s, 0.0000 assertions/s.
|
94
94
|
|
95
95
|
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
|
96
96
|
-----------------------------------------------------------------
|
97
|
+
=== test_htu21d.rb ===============================================
|
98
|
+
Run options: --seed 46260
|
99
|
+
|
100
|
+
# Running:
|
101
|
+
|
102
|
+
..
|
103
|
+
|
104
|
+
Finished in 0.408595s, 4.8948 runs/s, 12.2371 assertions/s.
|
105
|
+
|
106
|
+
2 runs, 5 assertions, 0 failures, 0 errors, 0 skips
|
107
|
+
-----------------------------------------------------------------
|
97
108
|
=== test_info.rb ===============================================
|
98
|
-
Run options: --seed
|
109
|
+
Run options: --seed 24217
|
99
110
|
|
100
111
|
# Running:
|
101
112
|
|
102
113
|
.....
|
103
114
|
|
104
|
-
Finished in 1.
|
115
|
+
Finished in 1.455289s, 3.4357 runs/s, 8.2458 assertions/s.
|
105
116
|
|
106
117
|
5 runs, 12 assertions, 0 failures, 0 errors, 0 skips
|
107
118
|
-----------------------------------------------------------------
|
108
119
|
=== test_ky008.rb ===============================================
|
109
|
-
Run options: --seed
|
120
|
+
Run options: --seed 55078
|
110
121
|
|
111
122
|
# Running:
|
112
123
|
|
113
124
|
...
|
114
125
|
|
115
|
-
Finished in 12.
|
126
|
+
Finished in 12.759427s, 0.2351 runs/s, 0.3135 assertions/s.
|
116
127
|
|
117
128
|
3 runs, 4 assertions, 0 failures, 0 errors, 0 skips
|
118
129
|
-----------------------------------------------------------------
|
119
130
|
=== test_led.rb ===============================================
|
120
|
-
Run options: --seed
|
131
|
+
Run options: --seed 48330
|
121
132
|
|
122
133
|
# Running:
|
123
134
|
|
124
135
|
....
|
125
136
|
|
126
|
-
Finished in 12.
|
137
|
+
Finished in 12.511824s, 0.3197 runs/s, 0.3197 assertions/s.
|
127
138
|
|
128
139
|
4 runs, 4 assertions, 0 failures, 0 errors, 0 skips
|
129
140
|
-----------------------------------------------------------------
|
130
141
|
=== test_led_rgb.rb ===============================================
|
131
|
-
Run options: --seed
|
142
|
+
Run options: --seed 23790
|
132
143
|
|
133
144
|
# Running:
|
134
145
|
|
135
146
|
.........
|
136
147
|
|
137
|
-
Finished in 18.
|
148
|
+
Finished in 18.518859s, 0.4860 runs/s, 0.7020 assertions/s.
|
138
149
|
|
139
150
|
9 runs, 13 assertions, 0 failures, 0 errors, 0 skips
|
140
151
|
-----------------------------------------------------------------
|
141
152
|
=== test_max44009_gy49.rb ===============================================
|
142
|
-
Run options: --seed
|
153
|
+
Run options: --seed 50569
|
143
154
|
|
144
155
|
# Running:
|
145
156
|
|
146
157
|
...
|
147
158
|
|
148
|
-
Finished in 0.
|
159
|
+
Finished in 0.027480s, 109.1689 runs/s, 109.1689 assertions/s.
|
149
160
|
|
150
161
|
3 runs, 3 assertions, 0 failures, 0 errors, 0 skips
|
151
162
|
-----------------------------------------------------------------
|
152
163
|
=== test_Raspberry_Pi_IoT.rb ===============================================
|
153
|
-
Run options: --seed
|
164
|
+
Run options: --seed 6903
|
154
165
|
|
155
166
|
# Running:
|
156
167
|
|
157
168
|
.
|
158
169
|
|
159
|
-
Finished in 0.
|
170
|
+
Finished in 0.003287s, 304.2024 runs/s, 304.2024 assertions/s.
|
160
171
|
|
161
172
|
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
|
162
173
|
-----------------------------------------------------------------
|
163
174
|
=== test_thermal.rb ===============================================
|
164
|
-
Run options: --seed
|
175
|
+
Run options: --seed 9997
|
165
176
|
|
166
177
|
# Running:
|
167
178
|
|
168
179
|
.
|
169
180
|
|
170
|
-
Finished in 0.
|
181
|
+
Finished in 0.003647s, 274.1649 runs/s, 1096.6596 assertions/s.
|
171
182
|
|
172
183
|
1 runs, 4 assertions, 0 failures, 0 errors, 0 skips
|
173
184
|
-----------------------------------------------------------------
|
data/test/test_ds18b20.rb
CHANGED
data/test/test_htu21d.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
require 'minitest/autorun'
|
4
|
+
|
5
|
+
$LOAD_PATH << "../lib" unless ARGV[0] == "gem"
|
6
|
+
require "iot/htu21d"
|
7
|
+
|
8
|
+
class RaspberryPiIoT_HTU21DTest < MiniTest::Test
|
9
|
+
|
10
|
+
def setup
|
11
|
+
@sensor = IoT::HTU21D.new
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_temperature
|
15
|
+
c = @sensor.celsius
|
16
|
+
assert c > 15.0
|
17
|
+
|
18
|
+
r = @sensor.reaumur
|
19
|
+
assert r < c
|
20
|
+
|
21
|
+
f = @sensor.fahrenheit
|
22
|
+
assert f > c
|
23
|
+
|
24
|
+
k = @sensor.temperature(:kelvin)
|
25
|
+
assert k > f
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_humidity
|
29
|
+
h = @sensor.humidity
|
30
|
+
assert h > 10.0
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raspberry_pi_iot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Shock (Mikhail V. Shokhirev)
|
@@ -202,6 +202,7 @@ files:
|
|
202
202
|
- lib/iot/ds18b20.rb
|
203
203
|
- lib/iot/effector.rb
|
204
204
|
- lib/iot/hcsr501.rb
|
205
|
+
- lib/iot/htu21d.rb
|
205
206
|
- lib/iot/humiture_sensor.rb
|
206
207
|
- lib/iot/led.rb
|
207
208
|
- lib/iot/led_pwm.rb
|
@@ -225,6 +226,7 @@ files:
|
|
225
226
|
- test/test_dht22.rb
|
226
227
|
- test/test_ds18b20.rb
|
227
228
|
- test/test_helper.rb
|
229
|
+
- test/test_htu21d.rb
|
228
230
|
- test/test_info.rb
|
229
231
|
- test/test_ky008.rb
|
230
232
|
- test/test_led.rb
|