raspberry_pi_iot 0.0.8 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +5 -5
  2. data/doc/IoT.html +8 -6
  3. data/doc/{Bus.html → RaspberryPiIoT.html} +21 -26
  4. data/doc/_index.html +84 -77
  5. data/doc/class_list.html +1 -1
  6. data/doc/file.LICENSE.html +92 -0
  7. data/doc/file.README.html +63 -29
  8. data/doc/file_list.html +5 -0
  9. data/doc/frames.html +1 -1
  10. data/doc/index.html +63 -29
  11. data/doc/method_list.html +170 -202
  12. data/doc/top-level-namespace.html +4 -6
  13. data/lib/bus.rb +0 -2
  14. data/lib/iot.rb +4 -2
  15. data/lib/iot/actuator.rb +7 -0
  16. data/lib/iot/bh1750.rb +54 -0
  17. data/lib/iot/binary_actuator.rb +7 -0
  18. data/lib/iot/binary_effector.rb +11 -0
  19. data/lib/iot/binary_receptor.rb +20 -0
  20. data/lib/iot/binary_sensor.rb +7 -0
  21. data/lib/iot/bmx_sensor.rb +73 -0
  22. data/lib/iot/button.rb +100 -0
  23. data/lib/iot/dht_sensor.rb +41 -0
  24. data/lib/iot/digital_actuator.rb +7 -0
  25. data/lib/iot/digital_effector.rb +67 -0
  26. data/lib/iot/digital_receptor.rb +17 -0
  27. data/lib/iot/digital_sensor.rb +7 -0
  28. data/lib/iot/ds18b20.rb +25 -0
  29. data/lib/iot/effector.rb +32 -0
  30. data/lib/iot/hcsr501.rb +8 -0
  31. data/lib/iot/humiture_sensor.rb +27 -0
  32. data/lib/iot/led.rb +64 -0
  33. data/lib/iot/led_pwm.rb +8 -0
  34. data/lib/iot/led_rgb.rb +86 -0
  35. data/lib/iot/max44009.rb +84 -0
  36. data/lib/iot/receptor.rb +38 -0
  37. data/lib/iot/sensor.rb +8 -0
  38. data/lib/iot/temperature_sensor.rb +51 -0
  39. data/lib/raspberry_pi.rb +46 -1
  40. data/lib/raspberry_pi_iot.rb +9 -3
  41. data/lib/raspberry_pi_iot/version.rb +3 -0
  42. data/lib/thermal_sensor.rb +2 -3
  43. data/test/test.sh +17 -0
  44. data/test/test.txt +173 -0
  45. data/test/test_Raspberry_Pi_IoT.rb +10 -0
  46. data/test/test_bh1750.rb +9 -4
  47. data/test/{standalone_test_bmp280.rb → test_bme280.rb} +24 -19
  48. data/test/test_bmp280.rb +52 -0
  49. data/test/test_button.rb +25 -14
  50. data/test/test_dht11.rb +3 -3
  51. data/test/test_dht22.rb +35 -0
  52. data/test/test_ds18b20.rb +4 -3
  53. data/test/test_helper.rb +6 -0
  54. data/test/test_info.rb +24 -3
  55. data/test/test_ky008.rb +41 -0
  56. data/test/test_led.rb +9 -9
  57. data/test/test_led_rgb.rb +28 -5
  58. data/test/test_max44009_gy49.rb +4 -4
  59. data/test/test_thermal.rb +27 -0
  60. metadata +103 -59
  61. data/doc/Actuator.html +0 -145
  62. data/doc/BH1750.html +0 -541
  63. data/doc/BME280.html +0 -276
  64. data/doc/BMP280.html +0 -276
  65. data/doc/BMxSensor.html +0 -557
  66. data/doc/BinaryActuator.html +0 -177
  67. data/doc/BinaryEffector.html +0 -246
  68. data/doc/BinaryReceptor.html +0 -387
  69. data/doc/BinarySensor.html +0 -168
  70. data/doc/Button.html +0 -986
  71. data/doc/DHT11.html +0 -287
  72. data/doc/DHT22.html +0 -287
  73. data/doc/DHTxxSensor.html +0 -361
  74. data/doc/DS18B20.html +0 -339
  75. data/doc/DigitalActuator.html +0 -164
  76. data/doc/DigitalEffector.html +0 -636
  77. data/doc/DigitalReceptor.html +0 -242
  78. data/doc/DigitalSensor.html +0 -162
  79. data/doc/Effector.html +0 -257
  80. data/doc/HCSR501.html +0 -172
  81. data/doc/HumitureSensor.html +0 -453
  82. data/doc/LED.html +0 -784
  83. data/doc/MAX44009.html +0 -830
  84. data/doc/RaspberryPi.html +0 -317
  85. data/doc/Receptor.html +0 -257
  86. data/doc/Sensor.html +0 -145
  87. data/doc/TemperatureSensor.html +0 -644
  88. data/lib/bh1750.rb +0 -46
  89. data/lib/binary_actuator.rb +0 -5
  90. data/lib/binary_effector.rb +0 -12
  91. data/lib/binary_receptor.rb +0 -19
  92. data/lib/binary_sensor.rb +0 -5
  93. data/lib/bmx_sensor.rb +0 -85
  94. data/lib/button.rb +0 -70
  95. data/lib/dht_sensor.rb +0 -36
  96. data/lib/digital_actuator.rb +0 -5
  97. data/lib/digital_effector.rb +0 -69
  98. data/lib/digital_receptor.rb +0 -16
  99. data/lib/digital_sensor.rb +0 -5
  100. data/lib/ds18b20.rb +0 -24
  101. data/lib/effector.rb +0 -32
  102. data/lib/hcsr501.rb +0 -7
  103. data/lib/humiture_sensor.rb +0 -26
  104. data/lib/led.rb +0 -58
  105. data/lib/led_pwm.rb +0 -6
  106. data/lib/led_rgb.rb +0 -101
  107. data/lib/max44009.rb +0 -77
  108. data/lib/receptor.rb +0 -33
  109. data/lib/temperature_sensor.rb +0 -49
@@ -1,784 +0,0 @@
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: LED
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 = "LED";
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 (L)</a> &raquo;
40
-
41
-
42
- <span class="title">LED</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: LED
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName"><span class='object_link'><a href="BinaryEffector.html" title="BinaryEffector (class)">BinaryEffector</a></span></span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next"><span class='object_link'><a href="Effector.html" title="Effector (class)">Effector</a></span></li>
78
-
79
- <li class="next"><span class='object_link'><a href="DigitalEffector.html" title="DigitalEffector (class)">DigitalEffector</a></span></li>
80
-
81
- <li class="next"><span class='object_link'><a href="BinaryEffector.html" title="BinaryEffector (class)">BinaryEffector</a></span></li>
82
-
83
- <li class="next">LED</li>
84
-
85
- </ul>
86
- <a href="#" class="inheritanceTree">show all</a>
87
-
88
- </dd>
89
- </dl>
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
- <dl>
102
- <dt>Defined in:</dt>
103
- <dd>lib/led.rb<span class="defines">,<br />
104
- lib/led_pwm.rb,<br /> lib/led.rb,<br /> lib/led_rgb.rb</span>
105
- </dd>
106
- </dl>
107
-
108
- </div>
109
-
110
- <h2>Overview</h2><div class="docstring">
111
- <div class="discussion">
112
-
113
- <p>Experimental methods with names in Russian</p>
114
-
115
-
116
- </div>
117
- </div>
118
- <div class="tags">
119
-
120
-
121
- </div><h2>Defined Under Namespace</h2>
122
- <p class="children">
123
-
124
-
125
-
126
-
127
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="LED/PWM.html" title="LED::PWM (class)">PWM</a></span>, <span class='object_link'><a href="LED/RGB.html" title="LED::RGB (class)">RGB</a></span>
128
-
129
-
130
- </p>
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
- <h2>
140
- Class Method Summary
141
- <small><a href="#" class="summary_toggle">collapse</a></small>
142
- </h2>
143
-
144
- <ul class="summary">
145
-
146
- <li class="public ">
147
- <span class="summary_signature">
148
-
149
- <a href="#%D1%81%D0%BE%D0%B7%D0%B4%D0%B0%D1%82%D1%8C-class_method" title="создать (class method)">.<strong>создать</strong>(pin = 25) &#x21d2; Object </a>
150
-
151
-
152
-
153
- </span>
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
- <span class="summary_desc"><div class='inline'></div></span>
164
-
165
- </li>
166
-
167
-
168
- </ul>
169
-
170
- <h2>
171
- Instance Method Summary
172
- <small><a href="#" class="summary_toggle">collapse</a></small>
173
- </h2>
174
-
175
- <ul class="summary">
176
-
177
- <li class="public ">
178
- <span class="summary_signature">
179
-
180
- <a href="#blink-instance_method" title="#blink (instance method)">#<strong>blink</strong>(repeat = 3, switched_on = 0.25, switched_off = 0.5) &#x21d2; Object </a>
181
-
182
-
183
-
184
- </span>
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
- <span class="summary_desc"><div class='inline'>
195
- <p>Repeat &#39;repeat&#39; times: light the LED for &#39;switched_on&#39;
196
- secs, then pause for &#39;switched_off&#39; secs.</p>
197
- </div></span>
198
-
199
- </li>
200
-
201
-
202
- <li class="public ">
203
- <span class="summary_signature">
204
-
205
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(pin) &#x21d2; LED </a>
206
-
207
-
208
-
209
- </span>
210
-
211
-
212
- <span class="note title constructor">constructor</span>
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
- <span class="summary_desc"><div class='inline'>
222
- <p>A new instance of LED.</p>
223
- </div></span>
224
-
225
- </li>
226
-
227
-
228
- <li class="public ">
229
- <span class="summary_signature">
230
-
231
- <a href="#off-instance_method" title="#off (instance method)">#<strong>off</strong>(pin = @pin) &#x21d2; Object </a>
232
-
233
-
234
-
235
- </span>
236
-
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
- <span class="summary_desc"><div class='inline'></div></span>
246
-
247
- </li>
248
-
249
-
250
- <li class="public ">
251
- <span class="summary_signature">
252
-
253
- <a href="#off_for-instance_method" title="#off_for (instance method)">#<strong>off_for</strong>(seconds = 1) &#x21d2; Object </a>
254
-
255
-
256
-
257
- </span>
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
- <span class="summary_desc"><div class='inline'></div></span>
268
-
269
- </li>
270
-
271
-
272
- <li class="public ">
273
- <span class="summary_signature">
274
-
275
- <a href="#on-instance_method" title="#on (instance method)">#<strong>on</strong>(pin = @pin) &#x21d2; Object </a>
276
-
277
-
278
-
279
- </span>
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
- <span class="summary_desc"><div class='inline'></div></span>
290
-
291
- </li>
292
-
293
-
294
- <li class="public ">
295
- <span class="summary_signature">
296
-
297
- <a href="#on_for-instance_method" title="#on_for (instance method)">#<strong>on_for</strong>(seconds = 1) &#x21d2; Object </a>
298
-
299
-
300
-
301
- </span>
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
- <span class="summary_desc"><div class='inline'></div></span>
312
-
313
- </li>
314
-
315
-
316
- <li class="public ">
317
- <span class="summary_signature">
318
-
319
- <a href="#%D0%B2%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C-instance_method" title="#включить (instance method)">#<strong>включить</strong> &#x21d2; Object </a>
320
-
321
-
322
-
323
- </span>
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
- <span class="summary_desc"><div class='inline'></div></span>
334
-
335
- </li>
336
-
337
-
338
- <li class="public ">
339
- <span class="summary_signature">
340
-
341
- <a href="#%D0%B2%D1%8B%D0%BA%D0%BB%D1%8E%D1%87%D0%B8%D1%82%D1%8C-instance_method" title="#выключить (instance method)">#<strong>выключить</strong> &#x21d2; Object </a>
342
-
343
-
344
-
345
- </span>
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
-
354
-
355
- <span class="summary_desc"><div class='inline'></div></span>
356
-
357
- </li>
358
-
359
-
360
- <li class="public ">
361
- <span class="summary_signature">
362
-
363
- <a href="#%D0%BC%D0%B8%D0%B3%D0%B0%D1%82%D1%8C-instance_method" title="#мигать (instance method)">#<strong>мигать</strong>(repeat = 3, switched_on = 0.25, switched_off = 0.5) &#x21d2; Object </a>
364
-
365
-
366
-
367
- </span>
368
-
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
- <span class="summary_desc"><div class='inline'></div></span>
378
-
379
- </li>
380
-
381
-
382
- </ul>
383
-
384
-
385
-
386
-
387
-
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
-
396
-
397
-
398
-
399
-
400
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="DigitalEffector.html" title="DigitalEffector (class)">DigitalEffector</a></span></h3>
401
- <p class="inherited"><span class='object_link'><a href="DigitalEffector.html#off-class_method" title="DigitalEffector.off (method)">off</a></span>, <span class='object_link'><a href="DigitalEffector.html#off%3F-instance_method" title="DigitalEffector#off? (method)">#off?</a></span>, <span class='object_link'><a href="DigitalEffector.html#on-class_method" title="DigitalEffector.on (method)">on</a></span>, <span class='object_link'><a href="DigitalEffector.html#on%3F-instance_method" title="DigitalEffector#on? (method)">#on?</a></span></p>
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
-
411
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Effector.html" title="Effector (class)">Effector</a></span></h3>
412
- <p class="inherited"><span class='object_link'><a href="Effector.html#model_name-instance_method" title="Effector#model_name (method)">#model_name</a></span>, <span class='object_link'><a href="Effector.html#name-instance_method" title="Effector#name (method)">#name</a></span></p>
413
- <div id="constructor_details" class="method_details_list">
414
- <h2>Constructor Details</h2>
415
-
416
- <div class="method_details first">
417
- <h3 class="signature first" id="initialize-instance_method">
418
-
419
- #<strong>initialize</strong>(pin) &#x21d2; <tt><span class='object_link'><a href="" title="LED (class)">LED</a></span></tt>
420
-
421
-
422
-
423
-
424
-
425
- </h3><div class="docstring">
426
- <div class="discussion">
427
-
428
- <p>Returns a new instance of LED</p>
429
-
430
-
431
- </div>
432
- </div>
433
- <div class="tags">
434
-
435
-
436
- </div><table class="source_code">
437
- <tr>
438
- <td>
439
- <pre class="lines">
440
-
441
-
442
- 5
443
- 6
444
- 7
445
- 8</pre>
446
- </td>
447
- <td>
448
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 5</span>
449
-
450
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
451
- <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
452
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>LED</span><span class='tstring_end'>&#39;</span></span>
453
- <span class='kw'>end</span></pre>
454
- </td>
455
- </tr>
456
- </table>
457
- </div>
458
-
459
- </div>
460
-
461
-
462
- <div id="class_method_details" class="method_details_list">
463
- <h2>Class Method Details</h2>
464
-
465
-
466
- <div class="method_details first">
467
- <h3 class="signature first" id="создать-class_method">
468
-
469
- .<strong>создать</strong>(pin = 25) &#x21d2; <tt>Object</tt>
470
-
471
-
472
-
473
-
474
-
475
- </h3><table class="source_code">
476
- <tr>
477
- <td>
478
- <pre class="lines">
479
-
480
-
481
- 43
482
- 44
483
- 45</pre>
484
- </td>
485
- <td>
486
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 43</span>
487
-
488
- <span class='kw'>def</span> <span class='const'><span class='object_link'><a href="" title="LED (class)">LED</a></span></span><span class='period'>.</span><span class='id identifier rubyid_создать'>создать</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span> <span class='op'>=</span> <span class='int'>25</span><span class='rparen'>)</span>
489
- <span class='const'><span class='object_link'><a href="" title="LED (class)">LED</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="LED#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
490
- <span class='kw'>end</span></pre>
491
- </td>
492
- </tr>
493
- </table>
494
- </div>
495
-
496
- </div>
497
-
498
- <div id="instance_method_details" class="method_details_list">
499
- <h2>Instance Method Details</h2>
500
-
501
-
502
- <div class="method_details first">
503
- <h3 class="signature first" id="blink-instance_method">
504
-
505
- #<strong>blink</strong>(repeat = 3, switched_on = 0.25, switched_off = 0.5) &#x21d2; <tt>Object</tt>
506
-
507
-
508
-
509
-
510
-
511
- </h3><div class="docstring">
512
- <div class="discussion">
513
-
514
- <p>Repeat &#39;repeat&#39; times: light the LED for &#39;switched_on&#39;
515
- secs, then pause for &#39;switched_off&#39; secs</p>
516
-
517
-
518
- </div>
519
- </div>
520
- <div class="tags">
521
-
522
-
523
- </div><table class="source_code">
524
- <tr>
525
- <td>
526
- <pre class="lines">
527
-
528
-
529
- 19
530
- 20
531
- 21
532
- 22
533
- 23
534
- 24
535
- 25
536
- 26</pre>
537
- </td>
538
- <td>
539
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 19</span>
540
-
541
- <span class='kw'>def</span> <span class='id identifier rubyid_blink'>blink</span><span class='lparen'>(</span><span class='id identifier rubyid_repeat'>repeat</span><span class='op'>=</span><span class='int'>3</span><span class='comma'>,</span> <span class='id identifier rubyid_switched_on'>switched_on</span><span class='op'>=</span><span class='float'>0.25</span><span class='comma'>,</span> <span class='id identifier rubyid_switched_off'>switched_off</span><span class='op'>=</span><span class='float'>0.5</span><span class='rparen'>)</span>
542
- <span class='id identifier rubyid_repeat'>repeat</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_n'>n</span><span class='op'>|</span>
543
- <span class='id identifier rubyid_on'>on</span>
544
- <span class='id identifier rubyid_sleep'>sleep</span> <span class='id identifier rubyid_switched_on'>switched_on</span>
545
- <span class='id identifier rubyid_off'>off</span>
546
- <span class='id identifier rubyid_sleep'>sleep</span> <span class='id identifier rubyid_switched_off'>switched_off</span>
547
- <span class='kw'>end</span>
548
- <span class='kw'>end</span></pre>
549
- </td>
550
- </tr>
551
- </table>
552
- </div>
553
-
554
- <div class="method_details ">
555
- <h3 class="signature " id="off-instance_method">
556
-
557
- #<strong>off</strong>(pin = @pin) &#x21d2; <tt>Object</tt>
558
-
559
-
560
-
561
-
562
-
563
- </h3><table class="source_code">
564
- <tr>
565
- <td>
566
- <pre class="lines">
567
-
568
-
569
- 14
570
- 15
571
- 16</pre>
572
- </td>
573
- <td>
574
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 14</span>
575
-
576
- <span class='kw'>def</span> <span class='id identifier rubyid_off'>off</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='op'>=</span><span class='ivar'>@pin</span><span class='rparen'>)</span>
577
- <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
578
- <span class='kw'>end</span></pre>
579
- </td>
580
- </tr>
581
- </table>
582
- </div>
583
-
584
- <div class="method_details ">
585
- <h3 class="signature " id="off_for-instance_method">
586
-
587
- #<strong>off_for</strong>(seconds = 1) &#x21d2; <tt>Object</tt>
588
-
589
-
590
-
591
-
592
-
593
- </h3><table class="source_code">
594
- <tr>
595
- <td>
596
- <pre class="lines">
597
-
598
-
599
- 34
600
- 35
601
- 36
602
- 37
603
- 38</pre>
604
- </td>
605
- <td>
606
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 34</span>
607
-
608
- <span class='kw'>def</span> <span class='id identifier rubyid_off_for'>off_for</span><span class='lparen'>(</span><span class='id identifier rubyid_seconds'>seconds</span><span class='op'>=</span><span class='int'>1</span><span class='rparen'>)</span>
609
- <span class='id identifier rubyid_off'>off</span>
610
- <span class='id identifier rubyid_sleep'>sleep</span> <span class='id identifier rubyid_seconds'>seconds</span>
611
- <span class='id identifier rubyid_on'>on</span>
612
- <span class='kw'>end</span></pre>
613
- </td>
614
- </tr>
615
- </table>
616
- </div>
617
-
618
- <div class="method_details ">
619
- <h3 class="signature " id="on-instance_method">
620
-
621
- #<strong>on</strong>(pin = @pin) &#x21d2; <tt>Object</tt>
622
-
623
-
624
-
625
-
626
-
627
- </h3><table class="source_code">
628
- <tr>
629
- <td>
630
- <pre class="lines">
631
-
632
-
633
- 10
634
- 11
635
- 12</pre>
636
- </td>
637
- <td>
638
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 10</span>
639
-
640
- <span class='kw'>def</span> <span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='op'>=</span><span class='ivar'>@pin</span><span class='rparen'>)</span>
641
- <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
642
- <span class='kw'>end</span></pre>
643
- </td>
644
- </tr>
645
- </table>
646
- </div>
647
-
648
- <div class="method_details ">
649
- <h3 class="signature " id="on_for-instance_method">
650
-
651
- #<strong>on_for</strong>(seconds = 1) &#x21d2; <tt>Object</tt>
652
-
653
-
654
-
655
-
656
-
657
- </h3><table class="source_code">
658
- <tr>
659
- <td>
660
- <pre class="lines">
661
-
662
-
663
- 28
664
- 29
665
- 30
666
- 31
667
- 32</pre>
668
- </td>
669
- <td>
670
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 28</span>
671
-
672
- <span class='kw'>def</span> <span class='id identifier rubyid_on_for'>on_for</span><span class='lparen'>(</span><span class='id identifier rubyid_seconds'>seconds</span><span class='op'>=</span><span class='int'>1</span><span class='rparen'>)</span>
673
- <span class='id identifier rubyid_on'>on</span>
674
- <span class='id identifier rubyid_sleep'>sleep</span> <span class='id identifier rubyid_seconds'>seconds</span>
675
- <span class='id identifier rubyid_off'>off</span>
676
- <span class='kw'>end</span></pre>
677
- </td>
678
- </tr>
679
- </table>
680
- </div>
681
-
682
- <div class="method_details ">
683
- <h3 class="signature " id="включить-instance_method">
684
-
685
- #<strong>включить</strong> &#x21d2; <tt>Object</tt>
686
-
687
-
688
-
689
-
690
-
691
- </h3><table class="source_code">
692
- <tr>
693
- <td>
694
- <pre class="lines">
695
-
696
-
697
- 47
698
- 48
699
- 49</pre>
700
- </td>
701
- <td>
702
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 47</span>
703
-
704
- <span class='kw'>def</span> <span class='id identifier rubyid_включить'>включить</span>
705
- <span class='id identifier rubyid_on'>on</span>
706
- <span class='kw'>end</span></pre>
707
- </td>
708
- </tr>
709
- </table>
710
- </div>
711
-
712
- <div class="method_details ">
713
- <h3 class="signature " id="выключить-instance_method">
714
-
715
- #<strong>выключить</strong> &#x21d2; <tt>Object</tt>
716
-
717
-
718
-
719
-
720
-
721
- </h3><table class="source_code">
722
- <tr>
723
- <td>
724
- <pre class="lines">
725
-
726
-
727
- 51
728
- 52
729
- 53</pre>
730
- </td>
731
- <td>
732
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 51</span>
733
-
734
- <span class='kw'>def</span> <span class='id identifier rubyid_выключить'>выключить</span>
735
- <span class='id identifier rubyid_off'>off</span>
736
- <span class='kw'>end</span></pre>
737
- </td>
738
- </tr>
739
- </table>
740
- </div>
741
-
742
- <div class="method_details ">
743
- <h3 class="signature " id="мигать-instance_method">
744
-
745
- #<strong>мигать</strong>(repeat = 3, switched_on = 0.25, switched_off = 0.5) &#x21d2; <tt>Object</tt>
746
-
747
-
748
-
749
-
750
-
751
- </h3><table class="source_code">
752
- <tr>
753
- <td>
754
- <pre class="lines">
755
-
756
-
757
- 55
758
- 56
759
- 57</pre>
760
- </td>
761
- <td>
762
- <pre class="code"><span class="info file"># File 'lib/led.rb', line 55</span>
763
-
764
- <span class='kw'>def</span> <span class='id identifier rubyid_мигать'>мигать</span><span class='lparen'>(</span><span class='id identifier rubyid_repeat'>repeat</span><span class='op'>=</span><span class='int'>3</span><span class='comma'>,</span> <span class='id identifier rubyid_switched_on'>switched_on</span><span class='op'>=</span><span class='float'>0.25</span><span class='comma'>,</span> <span class='id identifier rubyid_switched_off'>switched_off</span><span class='op'>=</span><span class='float'>0.5</span><span class='rparen'>)</span>
765
- <span class='id identifier rubyid_blink'>blink</span><span class='lparen'>(</span><span class='id identifier rubyid_repeat'>repeat</span><span class='comma'>,</span> <span class='id identifier rubyid_switched_on'>switched_on</span><span class='comma'>,</span> <span class='id identifier rubyid_switched_off'>switched_off</span><span class='rparen'>)</span>
766
- <span class='kw'>end</span></pre>
767
- </td>
768
- </tr>
769
- </table>
770
- </div>
771
-
772
- </div>
773
-
774
- </div>
775
-
776
- <div id="footer">
777
- Generated on Tue Dec 18 16:03:48 2018 by
778
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
779
- 0.9.16 (ruby-2.3.3).
780
- </div>
781
-
782
- </div>
783
- </body>
784
- </html>