mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 09:40:36 +00:00
Expand gitignore to include the usual py developing stuff, add an __init__ to make this a legitimate package, move GPIO initialization into the package init, import all stuff from input and output devices in the package to enable the access demonstrated in the example, remove a duplicate method from LightSensor, and make motion_detected a property (for consistency with is_active which it presumably parallels).
21 lines
301 B
Python
21 lines
301 B
Python
from RPi import GPIO
|
|
|
|
GPIO.setmode(GPIO.BCM)
|
|
GPIO.setwarnings(False)
|
|
|
|
from .input_devices import (
|
|
InputDeviceError,
|
|
InputDevice,
|
|
Button,
|
|
MotionSensor,
|
|
LightSensor,
|
|
TemperatureSensor,
|
|
)
|
|
from .output_devices import (
|
|
OutputDevice,
|
|
LED,
|
|
Buzzer,
|
|
Motor,
|
|
)
|
|
|