Skip to content

Latest commit

 

History

History
265 lines (168 loc) · 6.62 KB

api_boards.rst

File metadata and controls

265 lines (168 loc) · 6.62 KB

API - Boards and Accessories

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.

Regular Classes

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

LEDBoard(*pins, pwm=False, active_high=True, initial_value=False, pin_factory=None, **named_pins)

LEDBarGraph

LEDBarGraph(*pins, pwm=False, active_high=True, initial_value=0, pin_factory=None)

ButtonBoard

ButtonBoard(*pins, pull_up=True, active_state=None, bounce_time=None, hold_time=1, hold_repeat=False, pin_factory=None, **named_pins)

TrafficLights

TrafficLights(red, amber, green, *, yellow=None, pwm=False, initial_value=False, pin_factory=None)

TrafficLightsBuzzer

TrafficLightsBuzzer(lights, buzzer, button, *, pin_factory=None)

PiHutXmasTree

PiHutXmasTree(*, pwm=False, initial_value=False, pin_factory=None)

LedBorg

LedBorg(*, pwm=True, initial_value=(0, 0, 0), pin_factory=None)

PiLiter

PiLiter(*, pwm=False, initial_value=False, pin_factory=None)

PiLiterBarGraph

PiLiterBarGraph(*, pwm=False, initial_value=False, pin_factory=None)

PiTraffic

PiTraffic(*, pwm=False, initial_value=False, pin_factory=None)

PiStop

PiStop(location, *, pwm=False, initial_value=False, pin_factory=None)

FishDish

FishDish(*, pwm=False, pin_factory=None)

TrafficHat

TrafficHat(*, pwm=False, pin_factory=None)

JamHat

JamHat(*, pwm=False, pin_factory=None)

Robot

Robot(left, right, *, pwm=True, pin_factory=None)

PhaseEnableRobot

PhaseEnableRobot(left, right, *, pwm=True, pin_factory=None)

RyanteckRobot

RyanteckRobot(*, pwm=True, pin_factory=None)

CamJamKitRobot

CamJamKitRobot(*, pwm=True, pin_factory=None)

PololuDRV8835Robot

PololuDRV8835Robot(*, pwm=True, pin_factory=None)

Energenie

Energenie(socket, *, initial_value=False, pin_factory=None)

StatusZero

StatusZero(*labels, pwm=False, active_high=True, initial_value=False, pin_factory=None)

StatusBoard

StatusBoard(*labels, pwm=False, active_high=True, initial_value=False, pin_factory=None)

SnowPi

SnowPi(*, pwm=False, initial_value=False, pin_factory=None)

PumpkinPi

PumpkinPi(*, pwm=False, initial_value=False, pin_factory=None)

Base Classes

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

LEDCollection(*pins, pwm=False, active_high=True, initial_value=False, pin_factory=None, **named_pins)

CompositeOutputDevice

CompositeOutputDevice(*args, _order=None, pin_factory=None, **kwargs)

CompositeDevice

CompositeDevice(*args, _order=None, pin_factory=None, **kwargs)