Pin Module
This module help you to manage a pin
Examples:
>>> from pybox.pin import PIN
>>> led = PIN(9, 'OUTPUT')
>>> led.value = 1
The user basically should use only the PIN
class inside it.
Classes
PIN
PIN class
Parameters:
-
pin
(int
, default:None
) –pin to drive
-
direction
(str
, default:None
) –INPUT
orOUTPUT
Source code in pybox/pin.py
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 |
|
Attributes
value
property
writable
Get or set pin value
Returns:
-
int
–0 for null voltage (GND), 1 for maximum voltage (3V3)