Files
python-gpiozero/gpiozero/__init__.py
Dave Jones 7826e60c3d Fix #193
Changed pin.function so that it's always read-write, which in turn
permits InputDevice to force pin.function to "input" rather than
checking that it's not "input" first. This ensures internal state in
RPi.GPIO and RPIO reflects the reality of each pin's function (see
discussion under the ticket for more detail).
2016-04-03 15:45:28 +01:00

106 lines
1.8 KiB
Python

from __future__ import (
unicode_literals,
print_function,
absolute_import,
division,
)
from .pins import (
Pin,
)
from .exc import (
GPIOZeroError,
DeviceClosed,
CompositeDeviceError,
CompositeDeviceBadName,
SPIError,
SPIBadArgs,
EnergenieSocketMissing,
EnergenieBadSocket,
GPIODeviceError,
GPIODeviceClosed,
GPIOPinInUse,
GPIOPinMissing,
GPIOBadQueueLen,
GPIOBadSampleWait,
InputDeviceError,
OutputDeviceError,
OutputDeviceBadValue,
PinError,
PinInvalidFunction,
PinInvalidState,
PinInvalidPull,
PinInvalidEdges,
PinSetInput,
PinFixedPull,
PinEdgeDetectUnsupported,
PinPWMError,
PinPWMUnsupported,
PinPWMFixedValue,
GPIOZeroWarning,
SPIWarning,
SPISoftwareFallback,
)
from .devices import (
Device,
GPIODevice,
CompositeDevice,
SharedMixin,
SourceMixin,
ValuesMixin,
)
from .input_devices import (
InputDevice,
WaitableInputDevice,
DigitalInputDevice,
SmoothedInputDevice,
Button,
LineSensor,
MotionSensor,
LightSensor,
DistanceSensor,
)
from .spi_devices import (
SPIDevice,
AnalogInputDevice,
MCP3001,
MCP3002,
MCP3004,
MCP3008,
MCP3201,
MCP3202,
MCP3204,
MCP3208,
MCP3301,
MCP3302,
MCP3304,
)
from .output_devices import (
OutputDevice,
DigitalOutputDevice,
PWMOutputDevice,
PWMLED,
LED,
Buzzer,
Motor,
RGBLED,
)
from .boards import (
CompositeOutputDevice,
LEDCollection,
LEDBoard,
LEDBarGraph,
PiLiter,
PiLiterBarGraph,
TrafficLights,
PiTraffic,
SnowPi,
TrafficLightsBuzzer,
FishDish,
TrafficHat,
Robot,
RyanteckRobot,
CamJamKitRobot,
Energenie,
)