raspberry_pi_iot 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/doc/Actuator.html +145 -0
  3. data/doc/BH1750.html +535 -0
  4. data/doc/BME280.html +276 -0
  5. data/doc/BMP280.html +276 -0
  6. data/doc/BMxSensor.html +559 -0
  7. data/doc/BinaryActuator.html +177 -0
  8. data/doc/BinaryEffector.html +246 -0
  9. data/doc/BinaryReceptor.html +387 -0
  10. data/doc/BinarySensor.html +168 -0
  11. data/doc/Bus.html +126 -0
  12. data/doc/Button.html +986 -0
  13. data/doc/DHT11.html +287 -0
  14. data/doc/DHT22.html +287 -0
  15. data/doc/DHTxxSensor.html +361 -0
  16. data/doc/DS18B20.html +339 -0
  17. data/doc/DigitalActuator.html +164 -0
  18. data/doc/DigitalEffector.html +636 -0
  19. data/doc/DigitalReceptor.html +242 -0
  20. data/doc/DigitalSensor.html +162 -0
  21. data/doc/Effector.html +257 -0
  22. data/doc/HCSR501.html +172 -0
  23. data/doc/HumitureSensor.html +453 -0
  24. data/doc/IoT.html +116 -0
  25. data/doc/LED.html +784 -0
  26. data/doc/MAX44009.html +830 -0
  27. data/doc/RaspberryPi.html +309 -0
  28. data/doc/Receptor.html +257 -0
  29. data/doc/Sensor.html +145 -0
  30. data/doc/TemperatureSensor.html +644 -0
  31. data/doc/_index.html +379 -0
  32. data/doc/class_list.html +51 -0
  33. data/doc/file_list.html +51 -0
  34. data/doc/frames.html +17 -0
  35. data/doc/index.html +379 -0
  36. data/doc/method_list.html +715 -0
  37. data/doc/top-level-namespace.html +112 -0
  38. data/lib/bh1750.rb +43 -0
  39. data/lib/binary_effector.rb +16 -0
  40. data/lib/binary_receptor.rb +23 -0
  41. data/lib/bmx_sensor.rb +86 -0
  42. data/lib/bus.rb +26 -0
  43. data/lib/button.rb +70 -0
  44. data/lib/dht_sensor.rb +36 -0
  45. data/lib/digital_effector.rb +56 -0
  46. data/lib/digital_receptor.rb +20 -0
  47. data/lib/ds18b20.rb +24 -0
  48. data/lib/effector.rb +32 -0
  49. data/lib/hcsr501.rb +7 -0
  50. data/lib/humiture_sensor.rb +26 -0
  51. data/lib/iot.rb +4 -0
  52. data/lib/led.rb +58 -0
  53. data/lib/led_pwm.rb +6 -0
  54. data/lib/led_rgb.rb +100 -0
  55. data/lib/max44009.rb +77 -0
  56. data/lib/raspberry_pi.rb +41 -0
  57. data/lib/raspberry_pi_iot.rb +3 -0
  58. data/lib/receptor.rb +33 -0
  59. data/lib/temperature_sensor.rb +49 -0
  60. data/lib/thermal_sensor.rb +22 -0
  61. metadata +203 -0
@@ -0,0 +1,309 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: RaspberryPi
8
+
9
+ &mdash; Documentation by YARD 0.9.16
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "RaspberryPi";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (R)</a> &raquo;
40
+
41
+
42
+ <span class="title">RaspberryPi</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: RaspberryPi
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/thermal_sensor.rb<span class="defines">,<br />
82
+ lib/raspberry_pi.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+
91
+ <p>ThermalSensor - Raspberry Pi internal SoC temperature sensor</p>
92
+
93
+
94
+ </div>
95
+ </div>
96
+ <div class="tags">
97
+
98
+
99
+ </div><h2>Defined Under Namespace</h2>
100
+ <p class="children">
101
+
102
+
103
+
104
+
105
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="RaspberryPi/ThermalSensor.html" title="RaspberryPi::ThermalSensor (class)">ThermalSensor</a></span>
106
+
107
+
108
+ </p>
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <h2>
118
+ Class Method Summary
119
+ <small><a href="#" class="summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#hardware_info-class_method" title="hardware_info (class method)">.<strong>hardware_info</strong> &#x21d2; Object </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'>
142
+ <p>Revision : a22082 SoC : BCM2837 RAM
143
+ : 1024Mb Storage : MicroSD USB ports : 4 (excluding
144
+ power) Ethernet ports : 1 Wi-fi : True Bluetooth
145
+ : True Camera ports (CSI) : 1 Display ports (DSI): 1.</p>
146
+ </div></span>
147
+
148
+ </li>
149
+
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#pi_model-class_method" title="pi_model (class method)">.<strong>pi_model</strong> &#x21d2; Object </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+ <span class="summary_desc"><div class='inline'>
169
+ <p>Pi Model 3B V1.2.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ </ul>
176
+
177
+
178
+
179
+
180
+ <div id="class_method_details" class="method_details_list">
181
+ <h2>Class Method Details</h2>
182
+
183
+
184
+ <div class="method_details first">
185
+ <h3 class="signature first" id="hardware_info-class_method">
186
+
187
+ .<strong>hardware_info</strong> &#x21d2; <tt>Object</tt>
188
+
189
+
190
+
191
+
192
+
193
+ </h3><div class="docstring">
194
+ <div class="discussion">
195
+
196
+ <p>Revision : a22082 SoC : BCM2837 RAM
197
+ : 1024Mb Storage : MicroSD USB ports : 4 (excluding
198
+ power) Ethernet ports : 1 Wi-fi : True Bluetooth
199
+ : True Camera ports (CSI) : 1 Display ports (DSI): 1</p>
200
+
201
+
202
+ </div>
203
+ </div>
204
+ <div class="tags">
205
+
206
+
207
+ </div><table class="source_code">
208
+ <tr>
209
+ <td>
210
+ <pre class="lines">
211
+
212
+
213
+ 20
214
+ 21
215
+ 22
216
+ 23
217
+ 24
218
+ 25
219
+ 26
220
+ 27
221
+ 28
222
+ 29
223
+ 30
224
+ 31
225
+ 32
226
+ 33
227
+ 34
228
+ 35</pre>
229
+ </td>
230
+ <td>
231
+ <pre class="code"><span class="info file"># File 'lib/raspberry_pi.rb', line 20</span>
232
+
233
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hardware_info'>hardware_info</span>
234
+ <span class='id identifier rubyid_info'>info</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
235
+ <span class='id identifier rubyid_lines'>lines</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'> pinout | grep &#39;: &#39;</span><span class='tstring_end'>`</span></span>
236
+ <span class='id identifier rubyid_lines'>lines</span> <span class='op'>&lt;&lt;</span> <span class='backtick'>`</span><span class='tstring_content'>cat /proc/cpuinfo | grep &#39;: &#39;</span><span class='tstring_end'>`</span></span>
237
+ <span class='id identifier rubyid_lines'>lines</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='op'>|</span>
238
+ <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
239
+ <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_strip!'>strip!</span>
240
+ <span class='kw'>if</span> <span class='id identifier rubyid_key'>key</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>processor</span><span class='tstring_end'>&#39;</span></span>
241
+ <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='op'>+</span><span class='int'>1</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
242
+ <span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Cores</span><span class='tstring_end'>&#39;</span></span>
243
+ <span class='kw'>end</span>
244
+ <span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CPU name</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_key'>key</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>model name</span><span class='tstring_end'>&#39;</span></span>
245
+ <span class='id identifier rubyid_info'>info</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
246
+ <span class='kw'>end</span>
247
+ <span class='id identifier rubyid_info'>info</span>
248
+ <span class='kw'>end</span></pre>
249
+ </td>
250
+ </tr>
251
+ </table>
252
+ </div>
253
+
254
+ <div class="method_details ">
255
+ <h3 class="signature " id="pi_model-class_method">
256
+
257
+ .<strong>pi_model</strong> &#x21d2; <tt>Object</tt>
258
+
259
+
260
+
261
+
262
+
263
+ </h3><div class="docstring">
264
+ <div class="discussion">
265
+
266
+ <p>Pi Model 3B V1.2</p>
267
+
268
+
269
+ </div>
270
+ </div>
271
+ <div class="tags">
272
+
273
+
274
+ </div><table class="source_code">
275
+ <tr>
276
+ <td>
277
+ <pre class="lines">
278
+
279
+
280
+ 5
281
+ 6
282
+ 7
283
+ 8</pre>
284
+ </td>
285
+ <td>
286
+ <pre class="code"><span class="info file"># File 'lib/raspberry_pi.rb', line 5</span>
287
+
288
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_pi_model'>pi_model</span>
289
+ <span class='id identifier rubyid_info'>info</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>pinout | grep -Eo &quot;Pi Model[^|]+&quot;</span><span class='tstring_end'>`</span></span>
290
+ <span class='id identifier rubyid_info'>info</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
291
+ <span class='kw'>end</span></pre>
292
+ </td>
293
+ </tr>
294
+ </table>
295
+ </div>
296
+
297
+ </div>
298
+
299
+ </div>
300
+
301
+ <div id="footer">
302
+ Generated on Tue Dec 11 17:46:25 2018 by
303
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
304
+ 0.9.16 (ruby-2.3.3).
305
+ </div>
306
+
307
+ </div>
308
+ </body>
309
+ </html>
data/doc/Receptor.html ADDED
@@ -0,0 +1,257 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Receptor
8
+
9
+ &mdash; Documentation by YARD 0.9.16
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Receptor";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (R)</a> &raquo;
40
+
41
+
42
+ <span class="title">Receptor</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Receptor
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Receptor</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/receptor.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Receptor - physical device that can provide info about real world</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div><div id="subclasses">
114
+ <h2>Direct Known Subclasses</h2>
115
+ <p class="children"><span class='object_link'><a href="BinaryReceptor.html" title="BinaryReceptor (class)">BinaryReceptor</a></span>, <span class='object_link'><a href="DigitalReceptor.html" title="DigitalReceptor (class)">DigitalReceptor</a></span>, <span class='object_link'><a href="Sensor.html" title="Sensor (class)">Sensor</a></span></p>
116
+ </div>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h2>
126
+ Instance Method Summary
127
+ <small><a href="#" class="summary_toggle">collapse</a></small>
128
+ </h2>
129
+
130
+ <ul class="summary">
131
+
132
+ <li class="public ">
133
+ <span class="summary_signature">
134
+
135
+ <a href="#model_name-instance_method" title="#model_name (instance method)">#<strong>model_name</strong> &#x21d2; Object </a>
136
+
137
+
138
+
139
+ </span>
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'></div></span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> &#x21d2; Object </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'></div></span>
172
+
173
+ </li>
174
+
175
+
176
+ </ul>
177
+
178
+
179
+
180
+
181
+ <div id="instance_method_details" class="method_details_list">
182
+ <h2>Instance Method Details</h2>
183
+
184
+
185
+ <div class="method_details first">
186
+ <h3 class="signature first" id="model_name-instance_method">
187
+
188
+ #<strong>model_name</strong> &#x21d2; <tt>Object</tt>
189
+
190
+
191
+
192
+
193
+
194
+ </h3><table class="source_code">
195
+ <tr>
196
+ <td>
197
+ <pre class="lines">
198
+
199
+
200
+ 16
201
+ 17
202
+ 18</pre>
203
+ </td>
204
+ <td>
205
+ <pre class="code"><span class="info file"># File 'lib/receptor.rb', line 16</span>
206
+
207
+ <span class='kw'>def</span> <span class='id identifier rubyid_model_name'>model_name</span>
208
+ <span class='ivar'>@model</span>
209
+ <span class='kw'>end</span></pre>
210
+ </td>
211
+ </tr>
212
+ </table>
213
+ </div>
214
+
215
+ <div class="method_details ">
216
+ <h3 class="signature " id="name-instance_method">
217
+
218
+ #<strong>name</strong> &#x21d2; <tt>Object</tt>
219
+
220
+
221
+
222
+
223
+
224
+ </h3><table class="source_code">
225
+ <tr>
226
+ <td>
227
+ <pre class="lines">
228
+
229
+
230
+ 12
231
+ 13
232
+ 14</pre>
233
+ </td>
234
+ <td>
235
+ <pre class="code"><span class="info file"># File 'lib/receptor.rb', line 12</span>
236
+
237
+ <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
238
+ <span class='ivar'>@name</span>
239
+ <span class='kw'>end</span></pre>
240
+ </td>
241
+ </tr>
242
+ </table>
243
+ </div>
244
+
245
+ </div>
246
+
247
+ </div>
248
+
249
+ <div id="footer">
250
+ Generated on Tue Dec 11 17:46:39 2018 by
251
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
252
+ 0.9.16 (ruby-2.3.3).
253
+ </div>
254
+
255
+ </div>
256
+ </body>
257
+ </html>