mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Overhaul the pi_info system: Pin factories are now capable of generating pi_info themselves (although currently they all just look up the revision and call pi_info with a specific one). PiGPIOPin will now return pi_info for the remote pi which can be specified by parameter or implicitly by the environment vars. Overvolted Pis should work properly no matter what (some argument over whether the revision 7 or 8 chars in this case; both should work). Added some minor tweaks for the new camera-capable Pi Zero Finally, added a bunch of tests for pins.data
129 lines
2.1 KiB
Python
129 lines
2.1 KiB
Python
from __future__ import (
|
|
unicode_literals,
|
|
print_function,
|
|
absolute_import,
|
|
division,
|
|
)
|
|
|
|
from .pins import (
|
|
Pin,
|
|
LocalPin,
|
|
)
|
|
from .pins.data import (
|
|
PiBoardInfo,
|
|
PinInfo,
|
|
pi_info,
|
|
)
|
|
from .exc import (
|
|
GPIOZeroError,
|
|
DeviceClosed,
|
|
BadEventHandler,
|
|
BadWaitTime,
|
|
BadQueueLen,
|
|
CompositeDeviceError,
|
|
CompositeDeviceBadName,
|
|
CompositeDeviceBadOrder,
|
|
CompositeDeviceBadDevice,
|
|
SPIError,
|
|
SPIBadArgs,
|
|
EnergenieSocketMissing,
|
|
EnergenieBadSocket,
|
|
GPIODeviceError,
|
|
GPIODeviceClosed,
|
|
GPIOPinInUse,
|
|
GPIOPinMissing,
|
|
InputDeviceError,
|
|
OutputDeviceError,
|
|
OutputDeviceBadValue,
|
|
PinError,
|
|
PinInvalidFunction,
|
|
PinInvalidState,
|
|
PinInvalidPull,
|
|
PinInvalidEdges,
|
|
PinSetInput,
|
|
PinFixedPull,
|
|
PinEdgeDetectUnsupported,
|
|
PinPWMError,
|
|
PinPWMUnsupported,
|
|
PinPWMFixedValue,
|
|
PinUnknownPi,
|
|
PinMultiplePins,
|
|
PinNoPins,
|
|
GPIOZeroWarning,
|
|
SPIWarning,
|
|
SPISoftwareFallback,
|
|
PinWarning,
|
|
PinNonPhysical,
|
|
)
|
|
from .devices import (
|
|
Device,
|
|
GPIODevice,
|
|
CompositeDevice,
|
|
)
|
|
from .mixins import (
|
|
SharedMixin,
|
|
SourceMixin,
|
|
ValuesMixin,
|
|
EventsMixin,
|
|
HoldMixin,
|
|
)
|
|
from .input_devices import (
|
|
InputDevice,
|
|
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,
|
|
LedBorg,
|
|
PiLiter,
|
|
PiLiterBarGraph,
|
|
TrafficLights,
|
|
PiTraffic,
|
|
SnowPi,
|
|
TrafficLightsBuzzer,
|
|
FishDish,
|
|
TrafficHat,
|
|
Robot,
|
|
RyanteckRobot,
|
|
CamJamKitRobot,
|
|
Energenie,
|
|
)
|
|
from .other_devices import (
|
|
InternalDevice,
|
|
PingServer,
|
|
TimeOfDay,
|
|
)
|