1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
|
.. GPIO Zero: a library for controlling the Raspberry Pi's GPIO pins
..
.. Copyright (c) 2015-2021 Dave Jones <dave@waveform.org.uk>
.. Copyright (c) 2016-2020 Ben Nuttall <ben@bennuttall.com>
.. Copyright (c) 2018 Claire Pollard <claire.r.pollard@gmail.com>
.. Copyright (c) 2016 Andrew Scheller <github@loowis.durge.org>
.. Copyright (c) 2016 Andrew Scheller <lurch@durge.org>
..
.. SPDX-License-Identifier: BSD-3-Clause
============================
API - Boards and Accessories
============================
.. module:: gpiozero.boards
.. currentmodule:: 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 :doc:`api_input` and :doc:`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
:ref:`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
--------
.. autoclass:: LEDBoard
:members: on, off, blink, pulse, toggle
LEDBarGraph
-----------
.. autoclass:: LEDBarGraph
:members: value, source, values, lit_count
LEDCharDisplay
--------------
.. autoclass:: LEDCharDisplay
:members: value, font
LEDMultiCharDisplay
-------------------
.. autoclass:: LEDMultiCharDisplay
:members: value, plex_delay
LEDCharFont
-----------
.. autoclass:: LEDCharFont
ButtonBoard
-----------
.. autoclass:: ButtonBoard
:members: wait_for_press, wait_for_release, is_pressed, pressed_time, when_pressed, when_released, value
TrafficLights
-------------
.. autoclass:: TrafficLights
:members:
TrafficLightsBuzzer
-------------------
.. autoclass:: TrafficLightsBuzzer
:members:
PiHutXmasTree
-------------
.. autoclass:: PiHutXmasTree
:members:
LedBorg
-------
.. autoclass:: LedBorg
:members:
PiLiter
-------
.. autoclass:: PiLiter
:members:
PiLiterBarGraph
---------------
.. autoclass:: PiLiterBarGraph
:members:
PiTraffic
---------
.. autoclass:: PiTraffic
:members:
PiStop
------
.. autoclass:: PiStop
:members:
FishDish
--------
.. autoclass:: FishDish
:members:
TrafficHat
----------
.. autoclass:: TrafficHat
:members:
TrafficpHat
-----------
.. autoclass:: TrafficpHat
:members:
JamHat
------
.. autoclass:: JamHat
:members:
Pibrella
--------
.. autoclass:: Pibrella
:members:
Robot
-----
.. autoclass:: Robot
:members:
PhaseEnableRobot
----------------
.. autoclass:: PhaseEnableRobot
:members:
RyanteckRobot
-------------
.. autoclass:: RyanteckRobot
:members:
CamJamKitRobot
--------------
.. autoclass:: CamJamKitRobot
:members:
PololuDRV8835Robot
------------------
.. autoclass:: PololuDRV8835Robot
:members:
Energenie
---------
.. autoclass:: Energenie
:members: on, off, socket, value
StatusZero
----------
.. autoclass:: StatusZero
:members:
StatusBoard
-----------
.. autoclass:: StatusBoard
:members:
SnowPi
------
.. autoclass:: SnowPi
:members:
PumpkinPi
---------
.. autoclass:: PumpkinPi
:members:
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:
.. image:: images/composite_device_hierarchy.*
For composite devices, the following chart shows which devices are composed of
which other devices:
.. image:: images/composed_devices.*
The following sections document these base classes for advanced users that wish
to construct classes for their own devices.
LEDCollection
-------------
.. autoclass:: LEDCollection
:members:
CompositeOutputDevice
---------------------
.. autoclass:: CompositeOutputDevice
:members:
CompositeDevice
---------------
.. autoclass:: CompositeDevice
:members:
|