1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: package pixtendv2core</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>pixtendv2core</strong></big></big> (version 0.1.4)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/lib/python2.7/dist-packages/pixtendlibv2-0.1.4-py2.7.egg/pixtendv2core/__init__.py">/usr/local/lib/python2.7/dist-packages/pixtendlibv2-0.1.4-py2.7.egg/pixtendv2core/__init__.py</a></font></td></tr></table>
<p><tt># coding=utf-8</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="pixtendv2core.html#PiXtendV2Core">PiXtendV2Core</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="PiXtendV2Core">class <strong>PiXtendV2Core</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>The PiXtendV2 base class can be used to build PiXtend V2 modules, which use the same code base, thus reducing<br>
code multiplication. This class implements the most basic functions, properties and infrastructure needed to<br>
create a PiXtend V2 module in Python. This class cannot run on its own, it needs to be inherited by a child<br>
class and the functions '_pack_spi_data' and '_unpack_spi_data' have to be implemented there as these are<br>
defined as abstract functions and cannot be used directly.<br>
Furthermore, for the SPI data transfer to work correctly, the child class needs to implement a list[int] variable<br>
which holds the data which is sent to the microcontroller. The needed list[int] length can be found in the<br>
SPI protocol specification of the PiXtend V2 board.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="PiXtendV2Core-__del__"><strong>__del__</strong></a>(self)</dt><dd><tt>Destructor of the Pixtend V2 class. Delete objects.</tt></dd></dl>
<dl><dt><a name="PiXtendV2Core-__init__"><strong>__init__</strong></a>(self, spi_speed<font color="#909090">=700000</font>, com_interval<font color="#909090">=0.03</font>, model<font color="#909090">=0</font>, disable_dac<font color="#909090">=False</font>)</dt><dd><tt>Constructor of the PixtendV2 base class. Setup SPI communication, base variables and start<br>
the cyclic communication using a timer from the threading module.<br>
<br>
:param int spi_speed: SPI communication speed, default is 700000<br>
:param float com_interval: Cycle time of the communication, how often is data exchanged between the<br>
Raspberry Pi and the microcontroller on the PiXtend board, default is 30 ms<br>
:param int model: The model number of the PiXtend board which is used. S = 83 and L = 76<br>
:param bool disable_dac: The DAC (analog output) can be disabled to allow the use of the CAN-Bus on the<br>
PiXtend V2 -L- board</tt></dd></dl>
<dl><dt><a name="PiXtendV2Core-set_dac_output"><strong>set_dac_output</strong></a>(self, dac_channel<font color="#909090">=0</font>, value<font color="#909090">=0</font>)</dt><dd><tt>Set the analog output value for the chosen DAC. The value 0 or constant DAC_A selects DAC A which is<br>
"Analog Out 0" and the value 1 or constant DAC_B selects DAC B which is "Analog Out 1".<br>
Example:<br>
Selecting and setting DAC A:<br>
p.set_dac_output (p.DAC_A, 512)<br>
<br>
Selecting and setting DAC B:<br>
p.set_dac_output (p.DAC_B, 256)<br>
<br>
:param int dac_channel: Number of the DAC to set the new value to<br>
:param int value: Output value for the chosen DAC.<br>
:raises ValueError: If value is smaller then 0 or larger then 1023</tt></dd></dl>
<hr>
Static methods defined here:<br>
<dl><dt><a name="PiXtendV2Core-clear_bit"><strong>clear_bit</strong></a>(int_type, offset)</dt><dd><tt><a href="#PiXtendV2Core-clear_bit">clear_bit</a>() returns an integer with the bit at 'offset' cleared, set to 0.<br>
<br>
:param int int_type: Integer value in which to clear one bit<br>
:param int offset: Offset value which bit to clear<br>
:return: Integer with bit cleared a 'offset'<br>
:rtype: int</tt></dd></dl>
<dl><dt><a name="PiXtendV2Core-set_bit"><strong>set_bit</strong></a>(int_type, offset)</dt><dd><tt><a href="#PiXtendV2Core-set_bit">set_bit</a>() returns an integer with the bit at 'offset' set to 1.<br>
<br>
:param int int_type: Integer value in which to set one bit<br>
:param int offset: Offset value which bit to set<br>
:return: Integer with bit set at 'offset'<br>
:rtype: int</tt></dd></dl>
<dl><dt><a name="PiXtendV2Core-test_bit"><strong>test_bit</strong></a>(int_type, offset)</dt><dd><tt><a href="#PiXtendV2Core-test_bit">test_bit</a>() returns 1, if the bit at 'offset' is one else 0 if the bit is not set.<br>
<br>
:param int int_type: Integer value to test<br>
:param int offset: Offset value which bit to test<br>
:return: Integer based value of 0 if bit at 'offset' is not set or 1 if bit is set<br>
:rtype: int</tt></dd></dl>
<dl><dt><a name="PiXtendV2Core-toggle_bit"><strong>toggle_bit</strong></a>(int_type, offset)</dt><dd><tt><a href="#PiXtendV2Core-toggle_bit">toggle_bit</a>() returns an integer with the bit at 'offset' inverted, 0 -> 1 and 1 -> 0.<br>
<br>
:param int int_type: Integer value to toggle one bit within<br>
:param int offset: Offset value which bit to toggle<br>
:return: integer with bit toggled at 'offset'<br>
:rtype: int</tt></dd></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<dl><dt><strong>analog_out0</strong></dt>
<dd><tt>Get or Set the value of the Digital Analog Converter (DAC) for Analog Output 0.<br>
This function wraps the 'set_dac_output' function, this way only one value has<br>
to be provided, the DAC selection is automatic.<br>
Value range 0..1023 for 0V to 10V.<br>
<br>
Example:<br>
p.analog_out0 = 512<br>
myvalue = p.analog_out0<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>analog_out1</strong></dt>
<dd><tt>Get or Set the value of the Digital Analog Converter (DAC) for Analog Output 1.<br>
This function wraps the 'set_dac_output' function, this way only one value has<br>
to be provided, the DAC selection is automatic.<br>
Value range 0..1023 for 0V to 10V.<br>
<br>
Example:<br>
p.analog_out1 = 255 <br>
myvalue = p.analog_out1<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>crc_header_in_error</strong></dt>
<dd><tt>Get the error state of the CRC check performed on the SPI data header. If the CRC comparision is wrong<br>
the value will be True, if the header of the SPI data is correct, the value will be False.<br>
<br>
:return: Current value, False means no error, True means the header is not correct, error<br>
:rtype: bool</tt></dd>
</dl>
<dl><dt><strong>crc_header_in_error_counter</strong></dt>
<dd><tt>Get the error counter of the CRC check performed on the incoming SPI data header.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>firmware</strong></dt>
<dd><tt>Get the microcontroller's firmware version.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>gpio0</strong></dt>
<dd><tt>Get or Set the state of GPIO 0. The value False means 'off' and a value of True means 'on'.<br>
<br>
Example:<br>
p.gpio0 = p.ON # Turns the GPIO on<br>
p.gpio0 = p.OFF # Turns the GPIO off<br>
or use<br>
p.gpio0 = True # Turns the GPIO on<br>
p.gpio0 = False # Turns the GPIO off<br>
<br>
:return: Current value<br>
:rtype: bool</tt></dd>
</dl>
<dl><dt><strong>gpio0_ctrl</strong></dt>
<dd><tt>Get or Set the configuration of GPIO 0. Possible values are 0 (Input), 1 (Output), 2 (DHT11) or 3 (DHT22).<br>
<br>
:return: Current configuration<br>
:rtype: int<br>
:raises ValueError: If the passed value is not 0, 1, 2 or 3</tt></dd>
</dl>
<dl><dt><strong>gpio1</strong></dt>
<dd><tt>Get or Set the state of GPIO 1. The value False means 'off' and a value of True means 'on'.<br>
<br>
Example:<br>
p.gpio1 = p.ON # Turns the GPIO on<br>
p.gpio1 = p.OFF # Turns the GPIO off<br>
or use<br>
p.gpio1 = True # Turns the GPIO on<br>
p.gpio1 = False # Turns the GPIO off<br>
<br>
:return: Current value<br>
:rtype: bool</tt></dd>
</dl>
<dl><dt><strong>gpio1_ctrl</strong></dt>
<dd><tt>Get or Set the configuration of GPIO 1. Possible values are 0 (Input), 1 (Output), 2 (DHT11) or 3 (DHT22).<br>
<br>
:return: Current configuration<br>
:rtype: int<br>
:raises ValueError: If the passed value is not 0, 1, 2 or 3</tt></dd>
</dl>
<dl><dt><strong>gpio2</strong></dt>
<dd><tt>Get or Set the state of GPIO 2. The value False means 'off' and a value of True means 'on'.<br>
<br>
Example:<br>
p.gpio2 = p.ON # Turns the GPIO on<br>
p.gpio2 = p.OFF # Turns the GPIO off<br>
or use<br>
p.gpio2 = True # Turns the GPIO on<br>
p.gpio2 = False # Turns the GPIO off<br>
<br>
:return: Current value<br>
:rtype: bool</tt></dd>
</dl>
<dl><dt><strong>gpio2_ctrl</strong></dt>
<dd><tt>Get or Set the configuration of GPIO 2. Possible values are 0 (Input), 1 (Output), 2 (DHT11) or 3 (DHT22).<br>
<br>
:return: Current configuration<br>
:rtype: int<br>
:raises ValueError: If the passed value is not 0, 1, 2 or 3</tt></dd>
</dl>
<dl><dt><strong>gpio3</strong></dt>
<dd><tt>Get or Set the state of GPIO 3. The value False means 'off' and a value of True means 'on'.<br>
<br>
Example:<br>
p.gpio3 = p.ON # Turns the GPIO on<br>
p.gpio3 = p.OFF # Turns the GPIO off<br>
or use<br>
p.gpio3 = True # Turns the GPIO on<br>
p.gpio3 = False # Turns the GPIO off<br>
<br>
:return: Current value<br>
:rtype: bool</tt></dd>
</dl>
<dl><dt><strong>gpio3_ctrl</strong></dt>
<dd><tt>Get or Set the configuration of GPIO 3. Possible values are 0 (Input), 1 (Output), 2 (DHT11) or 3 (DHT22).<br>
<br>
:return: Current configuration<br>
:rtype: int<br>
:raises ValueError: If the passed value is not 0, 1, 2 or 3</tt></dd>
</dl>
<dl><dt><strong>gpio_pullups_enable</strong></dt>
<dd><tt>Enable or Disable the GPIO 0-3 pullups if the GPIOs are configured as outputs and the pullups are needed.<br>
Setting this property to True enables the pullups, if it is set to False the pullups remain off.<br>
<br>
:return: Current value<br>
:rtype: bool</tt></dd>
</dl>
<dl><dt><strong>hardware</strong></dt>
<dd><tt>Get the PiXtend V2 hardware revision.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>hum_input0_raw</strong></dt>
<dd><tt>Get the humidity raw value from humidity input 0.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>hum_input1_raw</strong></dt>
<dd><tt>Get the humidity raw value from humidity input 1.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>hum_input2_raw</strong></dt>
<dd><tt>Get the humidity raw value from humidity input 2.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>hum_input3_raw</strong></dt>
<dd><tt>Get the humidity raw value from humidity input 3.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>humid0</strong></dt>
<dd><tt>Get the converted humidity value from humidity input 0 if a DHT11/DHT22 sensor is physically attached.<br>
<br>
:return: Current value<br>
:rtype: float</tt></dd>
</dl>
<dl><dt><strong>humid1</strong></dt>
<dd><tt>Get the converted humidity value from humidity input 1 if a DHT11/DHT22 sensor is physically attached.<br>
<br>
:return: Current value<br>
:rtype: float</tt></dd>
</dl>
<dl><dt><strong>humid2</strong></dt>
<dd><tt>Get the converted humidity value from humidity input 2 if a DHT11/DHT22 sensor is physically attached.<br>
<br>
:return: Current value<br>
:rtype: float</tt></dd>
</dl>
<dl><dt><strong>humid3</strong></dt>
<dd><tt>Get the converted humidity value from humidity input 3 if a DHT11/DHT22 sensor is physically attached.<br>
<br>
:return: Current value<br>
:rtype: float</tt></dd>
</dl>
<dl><dt><strong>model_in</strong></dt>
<dd><tt>Get the PiXtend V2 model information from the microcontroller.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>model_in_error</strong></dt>
<dd><tt>Get the result of the comparison between the configured model, supplied by the child class through the init<br>
function (constructor) when the object is created, and the reported model by the microcontroller.<br>
If the configured model and the reported model match, the value will be False,<br>
if they don't match, the value will be True and signifies an error.<br>
<br>
:return: Current value, False means no error, True means the reported model does not match<br>
:rtype: bool</tt></dd>
</dl>
<dl><dt><strong>retain_copy</strong></dt>
<dd><tt>Get or Set the microcontroller's Retain memory option to copy incoming data to the outgoing data<br>
stream. This way the data which will be stored on the microcontroller, in the event of a sudden power loss,<br>
can be verified that the data really reaches the microcontroller and that values are correct. This option is<br>
mainly intended for debugging, but can be used by anyone.<br>
<br>
:return: Current value<br>
:rtype: bool<br>
:raises ValueError: If the passed value is not True or False</tt></dd>
</dl>
<dl><dt><strong>retain_enable</strong></dt>
<dd><tt>Get or Set the microcontroller's Retain memory option to enabled. With this option active a specified amount of<br>
data will be stored in the microcontroller's flash memory in the event of a sudden power loss. The exact amount<br>
of int's/bytes which a PiXtend V2 board can store can be found in the SPI protocol specifications.<br>
<br>
:return: Current value<br>
:rtype: bool<br>
:raises ValueError: If the passed value is not True or False</tt></dd>
</dl>
<dl><dt><strong>save_state</strong></dt>
<dd><tt>Get or Set the microcontroller's SaveState bit in case the computer has to shutdown or needs to reboot.<br>
Settings this property to True will halt the microcontroller and a reset is needed in order to start any<br>
communication again.<br>
<br>
:return: Current value<br>
:rtype: bool<br>
:raises ValueError: If the passed value is not True or False</tt></dd>
</dl>
<dl><dt><strong>state_led_off</strong></dt>
<dd><tt>Get or Set if the State LED (L1) on the PiXtend V2 board is on or off.<br>
True turns the LED off and False leave the State LED (L1) on.<br>
<br>
:return: Current value<br>
:rtype: bool<br>
:raises ValueError: If the passed value is not True or False</tt></dd>
</dl>
<dl><dt><strong>temp0</strong></dt>
<dd><tt>Get the converted temperature value from temperature input 0 from a DHT11 or DHT22 sensor.<br>
<br>
:return: Current value<br>
:rtype: float</tt></dd>
</dl>
<dl><dt><strong>temp1</strong></dt>
<dd><tt>Get the converted temperature value from temperature input 1 from a DHT11 or DHT22 sensor.<br>
<br>
:return: Current value<br>
:rtype: float</tt></dd>
</dl>
<dl><dt><strong>temp2</strong></dt>
<dd><tt>Get the converted temperature value from temperature input 2 from a DHT11 or DHT22 sensor.<br>
<br>
:return: Current value<br>
:rtype: float</tt></dd>
</dl>
<dl><dt><strong>temp3</strong></dt>
<dd><tt>Get the converted temperature value from temperature input 3 from a DHT11 or DHT22 sensor.<br>
<br>
:return: Current value<br>
:rtype: float</tt></dd>
</dl>
<dl><dt><strong>temp_input0_raw</strong></dt>
<dd><tt>Get the temperature raw value from temperature input 0.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>temp_input1_raw</strong></dt>
<dd><tt>Get the temperature raw value from temperature input 1.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>temp_input2_raw</strong></dt>
<dd><tt>Get the temperature raw value from temperature input 2.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>temp_input3_raw</strong></dt>
<dd><tt>Get the temperature raw value from temperature input 3.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>uc_state</strong></dt>
<dd><tt>The UCState byte from the microcontroller contains information of the following internal states:<br>
Bit 0: Run - The microcontroller is up and running, this is just a helper bit<br>
Bit 4: Error0 - Bit 0 of the 4 bit error number from the microcontroller. Together with the next 3<br>
Bit 5: Error1 - bits a 4 bit number can be formed which results in an error number which is<br>
Bit 6: Error2 - listed in the SPI protocol specification or the software manual.<br>
Bit 7: Error3<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>uc_warnings</strong></dt>
<dd><tt>The UCWarnings byte from the microcontroller contains information of the following internal errors:<br>
Bit 1: RetainCRCError - Signals a CRC error in the retain data in the microcontroller<br>
Bit 2: RetainVoltageError - The supply voltage is below 19 volts, the Retain memory option cannot be used.<br>
<br>
:return: Current value<br>
:rtype: int</tt></dd>
</dl>
<dl><dt><strong>use_fahrenheit</strong></dt>
<dd><tt>Get or Set if the conversion of the temperature raw value should be done in Fahrenheit.<br>
Default is 'False', meaning by getting the temperature from temp0 to temp3<br>
the value will be in degrees Celsius, if set to 'True' the values will be in Fahrenheit.<br>
<br>
:returns: Bool value, 'False' for Celsius and 'True' for Fahrenheit<br>
:rtype: bool</tt></dd>
</dl>
<dl><dt><strong>watchdog</strong></dt>
<dd><tt>Get or Set the PiXtend V2 watchdog option. WDT_OFF or 0 ms means the watchdog is disabled. One of the<br>
following time values 16 ms, 32 ms, 64 ms, 125 ms, 250 ms, 500 ms, 1000 ms (1s), 2000 ms (2s), 4000 ms (4s)<br>
and 8000 ms (8s) turns the watchdog function in the microcontroller on. If no SPI communication occurs within<br>
this time frame, the microcontroller will stop working and goes into save state. Only a reset or power cycle<br>
will bring it back to life once it has entered this stage.<br>
<br>
:return: Current value<br>
:rtype: int<br>
:raises ValueError: If the passed value is not one of the following: 16, 32, 64, 125, 250, 500, 1000,<br>
2000, 4000 or 8000</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>BIT_0</strong> = 0</dl>
<dl><dt><strong>BIT_1</strong> = 1</dl>
<dl><dt><strong>BIT_10</strong> = 10</dl>
<dl><dt><strong>BIT_11</strong> = 11</dl>
<dl><dt><strong>BIT_12</strong> = 12</dl>
<dl><dt><strong>BIT_13</strong> = 13</dl>
<dl><dt><strong>BIT_14</strong> = 14</dl>
<dl><dt><strong>BIT_15</strong> = 15</dl>
<dl><dt><strong>BIT_2</strong> = 2</dl>
<dl><dt><strong>BIT_3</strong> = 3</dl>
<dl><dt><strong>BIT_4</strong> = 4</dl>
<dl><dt><strong>BIT_5</strong> = 5</dl>
<dl><dt><strong>BIT_6</strong> = 6</dl>
<dl><dt><strong>BIT_7</strong> = 7</dl>
<dl><dt><strong>BIT_8</strong> = 8</dl>
<dl><dt><strong>BIT_9</strong> = 9</dl>
<dl><dt><strong>COM_INTERVAL_DEFAULT</strong> = 0.03</dl>
<dl><dt><strong>COM_INTERVAL_DHT</strong> = 0.03</dl>
<dl><dt><strong>COM_INTERVAL_MINIMUM</strong> = 0.01</dl>
<dl><dt><strong>DAC_A</strong> = 0</dl>
<dl><dt><strong>DAC_B</strong> = 1</dl>
<dl><dt><strong>DHT11</strong> = 0</dl>
<dl><dt><strong>DHT22</strong> = 1</dl>
<dl><dt><strong>GPIO_DHT11</strong> = 2</dl>
<dl><dt><strong>GPIO_DHT22</strong> = 3</dl>
<dl><dt><strong>GPIO_INPUT</strong> = 0</dl>
<dl><dt><strong>GPIO_OUTPUT</strong> = 1</dl>
<dl><dt><strong>JUMPER_10V</strong> = 1</dl>
<dl><dt><strong>JUMPER_5V</strong> = 0</dl>
<dl><dt><strong>MC_RESET_PIN</strong> = 23</dl>
<dl><dt><strong>OFF</strong> = False</dl>
<dl><dt><strong>ON</strong> = True</dl>
<dl><dt><strong>PIXTENDV2L_MODEL</strong> = 76</dl>
<dl><dt><strong>PIXTENDV2S_MODEL</strong> = 83</dl>
<dl><dt><strong>PWM_MODE</strong> = 1</dl>
<dl><dt><strong>RS232</strong> = 0</dl>
<dl><dt><strong>RS485</strong> = 0</dl>
<dl><dt><strong>SERVO_MODE</strong> = 0</dl>
<dl><dt><strong>SPI_ENABLE_PIN</strong> = 24</dl>
<dl><dt><strong>SPI_NOT_FOUND</strong> = -1</dl>
<dl><dt><strong>SPI_SPEED</strong> = 700000</dl>
<dl><dt><strong>WDT_125MS</strong> = 125</dl>
<dl><dt><strong>WDT_16MS</strong> = 16</dl>
<dl><dt><strong>WDT_1S</strong> = 1000</dl>
<dl><dt><strong>WDT_250MS</strong> = 250</dl>
<dl><dt><strong>WDT_2S</strong> = 2000</dl>
<dl><dt><strong>WDT_32MS</strong> = 32</dl>
<dl><dt><strong>WDT_4S</strong> = 4000</dl>
<dl><dt><strong>WDT_500MS</strong> = 500</dl>
<dl><dt><strong>WDT_64MS</strong> = 64</dl>
<dl><dt><strong>WDT_8S</strong> = 8000</dl>
<dl><dt><strong>WDT_OFF</strong> = 0</dl>
<dl><dt><strong>__abstractmethods__</strong> = frozenset(['_pack_spi_data', '_unpack_spi_data'])</dl>
<dl><dt><strong>__metaclass__</strong> = <class 'abc.ABCMeta'><dd><tt>Metaclass for defining Abstract Base Classes (ABCs).<br>
<br>
Use this metaclass to create an ABC. An ABC can be subclassed<br>
directly, and then acts as a mix-in class. You can also register<br>
unrelated concrete classes (even built-in classes) and unrelated<br>
ABCs as 'virtual subclasses' -- these and their descendants will<br>
be considered subclasses of the registering ABC by the built-in<br>
issubclass() function, but the registering ABC won't show up in<br>
their MRO (Method Resolution Order) nor will method<br>
implementations defined by the registering ABC be callable (not<br>
even via super()).</tt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>__author__</strong> = 'Robin Turner'<br>
<strong>__version__</strong> = '0.1.4'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
<tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td>
<td width="100%">Robin Turner</td></tr></table>
</body></html>
|