raspberry_pi_iot 0.0.12 → 0.1.3
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 +6 -4
- data/doc/RaspberryPiIoT.html +16 -10
- data/doc/_index.html +197 -21
- data/doc/class_list.html +1 -1
- data/doc/file.LICENSE.html +1 -1
- data/doc/file.README.html +15 -6
- data/doc/index.html +15 -6
- data/doc/method_list.html +590 -30
- data/doc/top-level-namespace.html +2 -2
- data/lib/iot/bh1750.rb +6 -4
- data/lib/iot/receptor.rb +6 -0
- data/lib/raspberry_pi.rb +1 -1
- data/lib/raspberry_pi_iot/version.rb +1 -1
- data/test/test.sh +5 -0
- data/test/test.txt +52 -169
- data/test/test_bh1750.rb +5 -0
- data/test/test_ky008.rb +41 -0
- metadata +2 -29
- data/doc/Actuator.html +0 -145
- data/doc/BH1750.html +0 -541
- data/doc/BME280.html +0 -276
- data/doc/BMP280.html +0 -276
- data/doc/BMxSensor.html +0 -557
- data/doc/BinaryActuator.html +0 -177
- data/doc/BinaryEffector.html +0 -246
- data/doc/BinaryReceptor.html +0 -387
- data/doc/BinarySensor.html +0 -168
- data/doc/Bus.html +0 -126
- data/doc/Button.html +0 -1276
- data/doc/DHT11.html +0 -287
- data/doc/DHT22.html +0 -287
- data/doc/DHTxxSensor.html +0 -361
- data/doc/DS18B20.html +0 -339
- data/doc/DigitalActuator.html +0 -164
- data/doc/DigitalEffector.html +0 -624
- data/doc/DigitalReceptor.html +0 -242
- data/doc/DigitalSensor.html +0 -162
- data/doc/Effector.html +0 -257
- data/doc/HCSR501.html +0 -172
- data/doc/HumitureSensor.html +0 -453
- data/doc/LED.html +0 -836
- data/doc/MAX44009.html +0 -830
- data/doc/RaspberryPi.html +0 -544
- data/doc/Receptor.html +0 -257
- data/doc/Sensor.html +0 -145
- data/doc/TemperatureSensor.html +0 -644
data/doc/LED.html
DELETED
@@ -1,836 +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
|
-
— 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> »
|
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) ⇒ 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) ⇒ 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 'repeat' times: light the LED for 'switched_on'
|
196
|
-
secs, then pause for 'switched_off' 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) ⇒ 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) ⇒ Object </a>
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
</span>
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
<span class="summary_desc"><div class='inline'>
|
246
|
-
<p>Turn off the LED.</p>
|
247
|
-
</div></span>
|
248
|
-
|
249
|
-
</li>
|
250
|
-
|
251
|
-
|
252
|
-
<li class="public ">
|
253
|
-
<span class="summary_signature">
|
254
|
-
|
255
|
-
<a href="#off_for-instance_method" title="#off_for (instance method)">#<strong>off_for</strong>(seconds = 1) ⇒ Object </a>
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
</span>
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
<span class="summary_desc"><div class='inline'>
|
270
|
-
<p>Turn the LED off for N seconds.</p>
|
271
|
-
</div></span>
|
272
|
-
|
273
|
-
</li>
|
274
|
-
|
275
|
-
|
276
|
-
<li class="public ">
|
277
|
-
<span class="summary_signature">
|
278
|
-
|
279
|
-
<a href="#on-instance_method" title="#on (instance method)">#<strong>on</strong>(pin = @pin) ⇒ Object </a>
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
</span>
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
<span class="summary_desc"><div class='inline'>
|
294
|
-
<p>Turn on the LED.</p>
|
295
|
-
</div></span>
|
296
|
-
|
297
|
-
</li>
|
298
|
-
|
299
|
-
|
300
|
-
<li class="public ">
|
301
|
-
<span class="summary_signature">
|
302
|
-
|
303
|
-
<a href="#on_for-instance_method" title="#on_for (instance method)">#<strong>on_for</strong>(seconds = 1) ⇒ Object </a>
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
</span>
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
<span class="summary_desc"><div class='inline'>
|
318
|
-
<p>Turn the LED on for N seconds.</p>
|
319
|
-
</div></span>
|
320
|
-
|
321
|
-
</li>
|
322
|
-
|
323
|
-
|
324
|
-
<li class="public ">
|
325
|
-
<span class="summary_signature">
|
326
|
-
|
327
|
-
<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> ⇒ Object </a>
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
</span>
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
342
|
-
|
343
|
-
</li>
|
344
|
-
|
345
|
-
|
346
|
-
<li class="public ">
|
347
|
-
<span class="summary_signature">
|
348
|
-
|
349
|
-
<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> ⇒ Object </a>
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
</span>
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
364
|
-
|
365
|
-
</li>
|
366
|
-
|
367
|
-
|
368
|
-
<li class="public ">
|
369
|
-
<span class="summary_signature">
|
370
|
-
|
371
|
-
<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) ⇒ Object </a>
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
</span>
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
386
|
-
|
387
|
-
</li>
|
388
|
-
|
389
|
-
|
390
|
-
</ul>
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="DigitalEffector.html" title="DigitalEffector (class)">DigitalEffector</a></span></h3>
|
409
|
-
<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>
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Effector.html" title="Effector (class)">Effector</a></span></h3>
|
420
|
-
<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>
|
421
|
-
<div id="constructor_details" class="method_details_list">
|
422
|
-
<h2>Constructor Details</h2>
|
423
|
-
|
424
|
-
<div class="method_details first">
|
425
|
-
<h3 class="signature first" id="initialize-instance_method">
|
426
|
-
|
427
|
-
#<strong>initialize</strong>(pin) ⇒ <tt><span class='object_link'><a href="" title="LED (class)">LED</a></span></tt>
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
</h3><div class="docstring">
|
434
|
-
<div class="discussion">
|
435
|
-
|
436
|
-
<p>Returns a new instance of LED</p>
|
437
|
-
|
438
|
-
|
439
|
-
</div>
|
440
|
-
</div>
|
441
|
-
<div class="tags">
|
442
|
-
|
443
|
-
|
444
|
-
</div><table class="source_code">
|
445
|
-
<tr>
|
446
|
-
<td>
|
447
|
-
<pre class="lines">
|
448
|
-
|
449
|
-
|
450
|
-
5
|
451
|
-
6
|
452
|
-
7
|
453
|
-
8</pre>
|
454
|
-
</td>
|
455
|
-
<td>
|
456
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 5</span>
|
457
|
-
|
458
|
-
<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>
|
459
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
|
460
|
-
<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'>'</span><span class='tstring_content'>LED</span><span class='tstring_end'>'</span></span>
|
461
|
-
<span class='kw'>end</span></pre>
|
462
|
-
</td>
|
463
|
-
</tr>
|
464
|
-
</table>
|
465
|
-
</div>
|
466
|
-
|
467
|
-
</div>
|
468
|
-
|
469
|
-
|
470
|
-
<div id="class_method_details" class="method_details_list">
|
471
|
-
<h2>Class Method Details</h2>
|
472
|
-
|
473
|
-
|
474
|
-
<div class="method_details first">
|
475
|
-
<h3 class="signature first" id="создать-class_method">
|
476
|
-
|
477
|
-
.<strong>создать</strong>(pin = 25) ⇒ <tt>Object</tt>
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
</h3><table class="source_code">
|
484
|
-
<tr>
|
485
|
-
<td>
|
486
|
-
<pre class="lines">
|
487
|
-
|
488
|
-
|
489
|
-
47
|
490
|
-
48
|
491
|
-
49</pre>
|
492
|
-
</td>
|
493
|
-
<td>
|
494
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 47</span>
|
495
|
-
|
496
|
-
<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>
|
497
|
-
<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>
|
498
|
-
<span class='kw'>end</span></pre>
|
499
|
-
</td>
|
500
|
-
</tr>
|
501
|
-
</table>
|
502
|
-
</div>
|
503
|
-
|
504
|
-
</div>
|
505
|
-
|
506
|
-
<div id="instance_method_details" class="method_details_list">
|
507
|
-
<h2>Instance Method Details</h2>
|
508
|
-
|
509
|
-
|
510
|
-
<div class="method_details first">
|
511
|
-
<h3 class="signature first" id="blink-instance_method">
|
512
|
-
|
513
|
-
#<strong>blink</strong>(repeat = 3, switched_on = 0.25, switched_off = 0.5) ⇒ <tt>Object</tt>
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
</h3><div class="docstring">
|
520
|
-
<div class="discussion">
|
521
|
-
|
522
|
-
<p>Repeat 'repeat' times: light the LED for 'switched_on'
|
523
|
-
secs, then pause for 'switched_off' secs</p>
|
524
|
-
|
525
|
-
|
526
|
-
</div>
|
527
|
-
</div>
|
528
|
-
<div class="tags">
|
529
|
-
|
530
|
-
|
531
|
-
</div><table class="source_code">
|
532
|
-
<tr>
|
533
|
-
<td>
|
534
|
-
<pre class="lines">
|
535
|
-
|
536
|
-
|
537
|
-
21
|
538
|
-
22
|
539
|
-
23
|
540
|
-
24
|
541
|
-
25
|
542
|
-
26
|
543
|
-
27
|
544
|
-
28</pre>
|
545
|
-
</td>
|
546
|
-
<td>
|
547
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 21</span>
|
548
|
-
|
549
|
-
<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>
|
550
|
-
<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>
|
551
|
-
<span class='id identifier rubyid_on'>on</span>
|
552
|
-
<span class='id identifier rubyid_sleep'>sleep</span> <span class='id identifier rubyid_switched_on'>switched_on</span>
|
553
|
-
<span class='id identifier rubyid_off'>off</span>
|
554
|
-
<span class='id identifier rubyid_sleep'>sleep</span> <span class='id identifier rubyid_switched_off'>switched_off</span>
|
555
|
-
<span class='kw'>end</span>
|
556
|
-
<span class='kw'>end</span></pre>
|
557
|
-
</td>
|
558
|
-
</tr>
|
559
|
-
</table>
|
560
|
-
</div>
|
561
|
-
|
562
|
-
<div class="method_details ">
|
563
|
-
<h3 class="signature " id="off-instance_method">
|
564
|
-
|
565
|
-
#<strong>off</strong>(pin = @pin) ⇒ <tt>Object</tt>
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
</h3><div class="docstring">
|
572
|
-
<div class="discussion">
|
573
|
-
|
574
|
-
<p>Turn off the LED.</p>
|
575
|
-
|
576
|
-
|
577
|
-
</div>
|
578
|
-
</div>
|
579
|
-
<div class="tags">
|
580
|
-
|
581
|
-
|
582
|
-
</div><table class="source_code">
|
583
|
-
<tr>
|
584
|
-
<td>
|
585
|
-
<pre class="lines">
|
586
|
-
|
587
|
-
|
588
|
-
16
|
589
|
-
17
|
590
|
-
18</pre>
|
591
|
-
</td>
|
592
|
-
<td>
|
593
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 16</span>
|
594
|
-
|
595
|
-
<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>
|
596
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
|
597
|
-
<span class='kw'>end</span></pre>
|
598
|
-
</td>
|
599
|
-
</tr>
|
600
|
-
</table>
|
601
|
-
</div>
|
602
|
-
|
603
|
-
<div class="method_details ">
|
604
|
-
<h3 class="signature " id="off_for-instance_method">
|
605
|
-
|
606
|
-
#<strong>off_for</strong>(seconds = 1) ⇒ <tt>Object</tt>
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
</h3><div class="docstring">
|
613
|
-
<div class="discussion">
|
614
|
-
|
615
|
-
<p>Turn the LED off for N seconds.</p>
|
616
|
-
|
617
|
-
|
618
|
-
</div>
|
619
|
-
</div>
|
620
|
-
<div class="tags">
|
621
|
-
|
622
|
-
|
623
|
-
</div><table class="source_code">
|
624
|
-
<tr>
|
625
|
-
<td>
|
626
|
-
<pre class="lines">
|
627
|
-
|
628
|
-
|
629
|
-
38
|
630
|
-
39
|
631
|
-
40
|
632
|
-
41
|
633
|
-
42</pre>
|
634
|
-
</td>
|
635
|
-
<td>
|
636
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 38</span>
|
637
|
-
|
638
|
-
<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>
|
639
|
-
<span class='id identifier rubyid_off'>off</span>
|
640
|
-
<span class='id identifier rubyid_sleep'>sleep</span> <span class='id identifier rubyid_seconds'>seconds</span>
|
641
|
-
<span class='id identifier rubyid_on'>on</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-instance_method">
|
650
|
-
|
651
|
-
#<strong>on</strong>(pin = @pin) ⇒ <tt>Object</tt>
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
</h3><div class="docstring">
|
658
|
-
<div class="discussion">
|
659
|
-
|
660
|
-
<p>Turn on the LED.</p>
|
661
|
-
|
662
|
-
|
663
|
-
</div>
|
664
|
-
</div>
|
665
|
-
<div class="tags">
|
666
|
-
|
667
|
-
|
668
|
-
</div><table class="source_code">
|
669
|
-
<tr>
|
670
|
-
<td>
|
671
|
-
<pre class="lines">
|
672
|
-
|
673
|
-
|
674
|
-
11
|
675
|
-
12
|
676
|
-
13</pre>
|
677
|
-
</td>
|
678
|
-
<td>
|
679
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 11</span>
|
680
|
-
|
681
|
-
<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>
|
682
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
|
683
|
-
<span class='kw'>end</span></pre>
|
684
|
-
</td>
|
685
|
-
</tr>
|
686
|
-
</table>
|
687
|
-
</div>
|
688
|
-
|
689
|
-
<div class="method_details ">
|
690
|
-
<h3 class="signature " id="on_for-instance_method">
|
691
|
-
|
692
|
-
#<strong>on_for</strong>(seconds = 1) ⇒ <tt>Object</tt>
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
</h3><div class="docstring">
|
699
|
-
<div class="discussion">
|
700
|
-
|
701
|
-
<p>Turn the LED on for N seconds.</p>
|
702
|
-
|
703
|
-
|
704
|
-
</div>
|
705
|
-
</div>
|
706
|
-
<div class="tags">
|
707
|
-
|
708
|
-
|
709
|
-
</div><table class="source_code">
|
710
|
-
<tr>
|
711
|
-
<td>
|
712
|
-
<pre class="lines">
|
713
|
-
|
714
|
-
|
715
|
-
31
|
716
|
-
32
|
717
|
-
33
|
718
|
-
34
|
719
|
-
35</pre>
|
720
|
-
</td>
|
721
|
-
<td>
|
722
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 31</span>
|
723
|
-
|
724
|
-
<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>
|
725
|
-
<span class='id identifier rubyid_on'>on</span>
|
726
|
-
<span class='id identifier rubyid_sleep'>sleep</span> <span class='id identifier rubyid_seconds'>seconds</span>
|
727
|
-
<span class='id identifier rubyid_off'>off</span>
|
728
|
-
<span class='kw'>end</span></pre>
|
729
|
-
</td>
|
730
|
-
</tr>
|
731
|
-
</table>
|
732
|
-
</div>
|
733
|
-
|
734
|
-
<div class="method_details ">
|
735
|
-
<h3 class="signature " id="включить-instance_method">
|
736
|
-
|
737
|
-
#<strong>включить</strong> ⇒ <tt>Object</tt>
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
</h3><table class="source_code">
|
744
|
-
<tr>
|
745
|
-
<td>
|
746
|
-
<pre class="lines">
|
747
|
-
|
748
|
-
|
749
|
-
51
|
750
|
-
52
|
751
|
-
53</pre>
|
752
|
-
</td>
|
753
|
-
<td>
|
754
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 51</span>
|
755
|
-
|
756
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_включить'>включить</span>
|
757
|
-
<span class='id identifier rubyid_on'>on</span>
|
758
|
-
<span class='kw'>end</span></pre>
|
759
|
-
</td>
|
760
|
-
</tr>
|
761
|
-
</table>
|
762
|
-
</div>
|
763
|
-
|
764
|
-
<div class="method_details ">
|
765
|
-
<h3 class="signature " id="выключить-instance_method">
|
766
|
-
|
767
|
-
#<strong>выключить</strong> ⇒ <tt>Object</tt>
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
</h3><table class="source_code">
|
774
|
-
<tr>
|
775
|
-
<td>
|
776
|
-
<pre class="lines">
|
777
|
-
|
778
|
-
|
779
|
-
55
|
780
|
-
56
|
781
|
-
57</pre>
|
782
|
-
</td>
|
783
|
-
<td>
|
784
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 55</span>
|
785
|
-
|
786
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_выключить'>выключить</span>
|
787
|
-
<span class='id identifier rubyid_off'>off</span>
|
788
|
-
<span class='kw'>end</span></pre>
|
789
|
-
</td>
|
790
|
-
</tr>
|
791
|
-
</table>
|
792
|
-
</div>
|
793
|
-
|
794
|
-
<div class="method_details ">
|
795
|
-
<h3 class="signature " id="мигать-instance_method">
|
796
|
-
|
797
|
-
#<strong>мигать</strong>(repeat = 3, switched_on = 0.25, switched_off = 0.5) ⇒ <tt>Object</tt>
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
</h3><table class="source_code">
|
804
|
-
<tr>
|
805
|
-
<td>
|
806
|
-
<pre class="lines">
|
807
|
-
|
808
|
-
|
809
|
-
59
|
810
|
-
60
|
811
|
-
61</pre>
|
812
|
-
</td>
|
813
|
-
<td>
|
814
|
-
<pre class="code"><span class="info file"># File 'lib/led.rb', line 59</span>
|
815
|
-
|
816
|
-
<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>
|
817
|
-
<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>
|
818
|
-
<span class='kw'>end</span></pre>
|
819
|
-
</td>
|
820
|
-
</tr>
|
821
|
-
</table>
|
822
|
-
</div>
|
823
|
-
|
824
|
-
</div>
|
825
|
-
|
826
|
-
</div>
|
827
|
-
|
828
|
-
<div id="footer">
|
829
|
-
Generated on Wed Dec 26 18:10:13 2018 by
|
830
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
831
|
-
0.9.16 (ruby-2.3.3).
|
832
|
-
</div>
|
833
|
-
|
834
|
-
</div>
|
835
|
-
</body>
|
836
|
-
</html>
|