gpiozero.boards
gpiozero
These additional interfaces are provided to group collections of components together for ease of use, and as examples. They are composites made up of components from the various api_input
and api_output
provided by GPIO Zero. See those pages for more information on using components individually.
Note
All GPIO pin numbers use Broadcom (BCM) numbering by default. See the pin-numbering
section for more information.
The following classes are intended for general use with the devices they are named after. All classes in this section are concrete (not abstract).
LEDBoard(*pins, pwm=False, active_high=True, initial_value=False, pin_factory=None, **named_pins)
LEDBarGraph(*pins, pwm=False, active_high=True, initial_value=0, pin_factory=None)
ButtonBoard(*pins, pull_up=True, active_state=None, bounce_time=None, hold_time=1, hold_repeat=False, pin_factory=None, **named_pins)
TrafficLights(red, amber, green, *, yellow=None, pwm=False, initial_value=False, pin_factory=None)
TrafficLightsBuzzer(lights, buzzer, button, *, pin_factory=None)
PiHutXmasTree(*, pwm=False, initial_value=False, pin_factory=None)
LedBorg(*, pwm=True, initial_value=(0, 0, 0), pin_factory=None)
PiLiter(*, pwm=False, initial_value=False, pin_factory=None)
PiLiterBarGraph(*, pwm=False, initial_value=False, pin_factory=None)
PiTraffic(*, pwm=False, initial_value=False, pin_factory=None)
PiStop(location, *, pwm=False, initial_value=False, pin_factory=None)
FishDish(*, pwm=False, pin_factory=None)
TrafficHat(*, pwm=False, pin_factory=None)
JamHat(*, pwm=False, pin_factory=None)
Robot(left, right, *, pwm=True, pin_factory=None)
PhaseEnableRobot(left, right, *, pwm=True, pin_factory=None)
RyanteckRobot(*, pwm=True, pin_factory=None)
CamJamKitRobot(*, pwm=True, pin_factory=None)
PololuDRV8835Robot(*, pwm=True, pin_factory=None)
Energenie(socket, *, initial_value=False, pin_factory=None)
StatusZero(*labels, pwm=False, active_high=True, initial_value=False, pin_factory=None)
StatusBoard(*labels, pwm=False, active_high=True, initial_value=False, pin_factory=None)
SnowPi(*, pwm=False, initial_value=False, pin_factory=None)
PumpkinPi(*, pwm=False, initial_value=False, pin_factory=None)
The classes in the sections above are derived from a series of base classes, some of which are effectively abstract. The classes form the (partial) hierarchy displayed in the graph below:
For composite devices, the following chart shows which devices are composed of which other devices:
The following sections document these base classes for advanced users that wish to construct classes for their own devices.
LEDCollection(*pins, pwm=False, active_high=True, initial_value=False, pin_factory=None, **named_pins)
CompositeOutputDevice(*args, _order=None, pin_factory=None, **kwargs)
CompositeDevice(*args, _order=None, pin_factory=None, **kwargs)