Name Date Size

..27-Apr.-20224 KiB

.github/H16-Feb.-20214 KiB

.gitignoreH A D01-Nov.-2021213

docs/H05-Apr.-20224 KiB

gpiozero/H18-Jun.-20224 KiB

gpiozerocli/H19-Mar.-20214 KiB

LICENSE.rstH A D19-Mar.-20211.4 KiB

MakefileH A D01-Nov.-20213.2 KiB

README.rstH A D19-Mar.-20218 KiB

RELEASE.rstH A D23-Sep.-20191.7 KiB

scripts/H01-Nov.-20214 KiB

setup.cfgH A D19-Nov.-20212.9 KiB

setup.pyH A D19-Mar.-2021760

tests/H01-Nov.-20214 KiB

tox.iniH A D19-Mar.-2021265

README.rst

1========
2gpiozero
3========
4
5A simple interface to GPIO devices with `Raspberry Pi`_, developed and maintained
6by `Ben Nuttall`_ and `Dave Jones`_.
7
8.. _Raspberry Pi: https://www.raspberrypi.org/
9.. _Ben Nuttall: https://github.com/bennuttall
10.. _Dave Jones: https://github.com/waveform80
11
12About
13=====
14
15Component interfaces are provided to allow a frictionless way to get started
16with physical computing:
17
18.. code:: python
19
20    from gpiozero import LED
21    from time import sleep
22
23    led = LED(17)
24
25    while True:
26        led.on()
27        sleep(1)
28        led.off()
29        sleep(1)
30
31With very little code, you can quickly get going connecting your components
32together:
33
34.. code:: python
35
36    from gpiozero import LED, Button
37    from signal import pause
38
39    led = LED(17)
40    button = Button(3)
41
42    button.when_pressed = led.on
43    button.when_released = led.off
44
45    pause()
46
47You can advance to using the declarative paradigm along with provided
48to describe the behaviour of devices and their interactions:
49
50.. code:: python
51
52    from gpiozero import OutputDevice, MotionSensor, LightSensor
53    from gpiozero.tools import booleanized, all_values
54    from signal import pause
55
56    garden = OutputDevice(17)
57    motion = MotionSensor(4)
58    light = LightSensor(5)
59
60    garden.source = all_values(booleanized(light, 0, 0.1), motion)
61
62    pause()
63
64See the chapter on `Source/Values`_ for more information.
65
66.. _Source/Values: https://gpiozero.readthedocs.io/en/stable/source_values.html
67
68The library includes interfaces to many simple everyday components, as well as
69some more complex things like sensors, analogue-to-digital converters, full
70colour LEDs, robotics kits and more. See the `Recipes`_ chapter of the
71documentation for ideas on how to get started.
72
73.. _Recipes: https://gpiozero.readthedocs.io/en/stable/recipes.html
74
75Pin factories
76=============
77
78GPIO Zero builds on a number of underlying pin libraries, including `RPi.GPIO`_
79and `pigpio`_, each with their own benefits. You can select a particular pin
80library to be used, either for the whole script or per-device, according to your
81needs. See the section on `changing the pin factory`_.
82
83.. _RPi.GPIO: https://pypi.org/project/RPi.GPIO
84.. _pigpio: https://pypi.org/project/pigpio
85.. _changing the pin factory: https://gpiozero.readthedocs.io/en/stable/api_pins.html#changing-the-pin-factory
86
87A "mock pin" interface is also provided for testing purposes. Read more about
88this in the section on `mock pins`_.
89
90.. _mock pins: https://gpiozero.readthedocs.io/en/stable/api_pins.html#mock-pins
91
92Installation
93============
94
95GPIO Zero is installed by default in the Raspberry Pi OS desktop image,
96available from `raspberrypi.org`_. To install on Raspberry Pi OS Lite or other
97operating systems, including for PCs using remote GPIO, see the `Installing`_
98chapter.
99
100.. _raspberrypi.org: https://www.raspberrypi.org/software/
101.. _Installing: https://gpiozero.readthedocs.io/en/stable/installing.html
102
103Documentation
104=============
105
106Comprehensive documentation is available at https://gpiozero.readthedocs.io/.
107Please refer to the `Contributing`_ and `Development`_ chapters in the
108documentation for information on contributing to the project.
109
110.. _Contributing: https://gpiozero.readthedocs.io/en/stable/contributing.html
111.. _Development: https://gpiozero.readthedocs.io/en/stable/development.html
112
113Issues and questions
114====================
115
116If you have a feature request or bug report, please open an `issue on GitHub`_.
117If you have a question or need help, this may be better suited to our `GitHub
118discussion board`_, the `Raspberry Pi Stack Exchange`_ or the `Raspberry Pi
119Forums`_.
120
121.. _issue on GitHub: https://github.com/gpiozero/gpiozero/issues/new
122.. _GitHub discussion board: https://github.com/gpiozero/gpiozero/discussions
123.. _Raspberry Pi Stack Exchange: https://raspberrypi.stackexchange.com/
124.. _Raspberry Pi Forums: https://www.raspberrypi.org/forums/
125
126Python 2 support
127================
128
129.. warning::
130
131    GPIO Zero 1.6.x is the last to support Python 2. GPIO Zero 2.x will support
132    Python 3 only.
133
134Contributors
135============
136
137- `Alex Chan`_
138- `Alex Eames`_
139- `Andrew Scheller`_
140- `Barry Byford`_
141- `Carl Monk`_
142- `Claire Pollard`_
143- `Clare Macrae`_
144- `Dan Jackson`_
145- `Daniele Procida`_
146- `damosurfer`_
147- `David Glaude`_
148- `Delcio Torres`_
149- `Edward Betts`_
150- `Fatih Sarhan`_
151- `G.S.`_
152- `Ian Harcombe`_
153- `Jack Wearden`_
154- `Jeevan M R`_
155- `Josh Thorpe`_
156- `Kyle Morgan`_
157- `Linus Groh`_
158- `Mahallon`_
159- `Maksim Levental`_
160- `Martchus`_
161- `Martin O'Hanlon`_
162- `Mike Kazantsev`_
163- `Paulo Mateus`_
164- `Phil Howard`_
165- `Philippe Muller`_
166- `Rick Ansell`_
167- `Robert Erdin`_
168- `Russel Winder`_
169- `Ryan Walmsley`_
170- `Schelto van Doorn`_
171- `Sofiia Kosovan`_
172- `Steve Amor`_
173- `Stewart Adcock`_
174- `Thijs Triemstra`_
175- `Tim Golden`_
176- `Yisrael Dov Lebow`_
177
178See the `contributors page`_ on GitHub for more info.
179
180.. _Alex Chan: https://github.com/gpiozero/gpiozero/commits?author=alexwlchan
181.. _Alex Eames: https://github.com/gpiozero/gpiozero/commits?author=raspitv
182.. _Andrew Scheller: https://github.com/gpiozero/gpiozero/commits?author=lurch
183.. _Barry Byford: https://github.com/gpiozero/gpiozero/commits?author=ukBaz
184.. _Carl Monk: https://github.com/gpiozero/gpiozero/commits?author=ForToffee
185.. _Chris R: https://github.com/gpiozero/gpiozero/commits?author=chrisruk
186.. _Claire Pollard: https://github.com/gpiozero/gpiozero/commits?author=tuftii
187.. _Clare Macrae: https://github.com/gpiozero/gpiozero/commits?author=claremacrae
188.. _Dan Jackson: https://github.com/gpiozero/gpiozero/commits?author=e28eta
189.. _Daniele Procida: https://github.com/evildmp
190.. _Dariusz Kowalczyk: https://github.com/gpiozero/gpiozero/commits?author=darton
191.. _damosurfer: https://github.com/gpiozero/gpiozero/commits?author=damosurfer
192.. _David Glaude: https://github.com/gpiozero/gpiozero/commits?author=dglaude
193.. _Delcio Torres: https://github.com/gpiozero/gpiozero/commits?author=delciotorres
194.. _Edward Betts: https://github.com/gpiozero/gpiozero/commits?author=edwardbetts
195.. _Fatih Sarhan: https://github.com/gpiozero/gpiozero/commits?author=f9n
196.. _G.S.: https://github.com/gpiozero/gpiozero/commits?author=gszy
197.. _Ian Harcombe: https://github.com/gpiozero/gpiozero/commits?author=MrHarcombe
198.. _Jack Wearden: https://github.com/gpiozero/gpiozero/commits?author=NotBobTheBuilder
199.. _Jeevan M R: https://github.com/gpiozero/gpiozero/commits?author=jee1mr
200.. _Josh Thorpe: https://github.com/gpiozero/gpiozero/commits?author=ThorpeJosh
201.. _Kyle Morgan: https://github.com/gpiozero/gpiozero/commits?author=knmorgan
202.. _Linus Groh: https://github.com/gpiozero/gpiozero/commits?author=linusg
203.. _Mahallon: https://github.com/gpiozero/gpiozero/commits?author=Mahallon
204.. _Maksim Levental: https://github.com/gpiozero/gpiozero/commits?author=makslevental
205.. _Martchus: https://github.com/gpiozero/gpiozero/commits?author=Martchus
206.. _Martin O'Hanlon: https://github.com/martinohanlon/commits?author=martinohanlon
207.. _Mike Kazantsev: https://github.com/gpiozero/gpiozero/commits?author=mk-fg
208.. _Paulo Mateus: https://github.com/gpiozero/gpiozero/commits?author=SrMouraSilva
209.. _Phil Howard: https://github.com/gpiozero/gpiozero/commits?author=Gadgetoid
210.. _Philippe Muller: https://github.com/gpiozero/gpiozero/commits?author=pmuller
211.. _Rick Ansell: https://github.com/gpiozero/gpiozero/commits?author=ricksbt
212.. _Robert Erdin: https://github.com/gpiozero/gpiozero/commits?author=roberterdin
213.. _Russel Winder: https://github.com/russel
214.. _Ryan Walmsley: https://github.com/gpiozero/gpiozero/commits?author=ryanteck
215.. _Schelto van Doorn: https://github.com/gpiozero/gpiozero/commits?author=goloplo
216.. _Sofiia Kosovan: https://github.com/gpiozero/gpiozero/commits?author=SofiiaKosovan
217.. _Steve Amor: https://github.com/gpiozero/gpiozero/commits?author=SteveAmor
218.. _Stewart Adcock: https://github.com/gpiozero/gpiozero/commits?author=stewartadcock
219.. _Thijs Triemstra: https://github.com/gpiozero/gpiozero/commits?author=thijstriemstra
220.. _Tim Golden: https://github.com/gpiozero/gpiozero/commits?author=tjguk
221.. _Yisrael Dov Lebow: https://github.com/gpiozero/gpiozero/commits?author=yisraeldov
222
223.. _contributors page: https://github.com/gpiozero/gpiozero/graphs/contributors
224