mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-12-08 20:39:01 +00:00
Fix all the stuff you broke last night...
In particular the `pi_revision` thing in PiGPIOPin, all the stuff @lurch picked up in `pins/data.py` (thank goodness *someone's* watching!), and make all those links pointing to "Notes" point somewhere useful like "Pin Numbering"...
This commit is contained in:
@@ -12,9 +12,9 @@ devices = [InputDevice(device) for device in list_devices()]
|
||||
must_have = {i for i in range(1, 32)}
|
||||
must_not_have = {0}
|
||||
devices = [
|
||||
device
|
||||
for device in devices
|
||||
for keys in (set(device.capabilities().get(ecodes.EV_KEY, [])),)
|
||||
dev
|
||||
for dev in devices
|
||||
for keys in (set(dev.capabilities().get(ecodes.EV_KEY, [])),)
|
||||
if must_have.issubset(keys)
|
||||
and must_not_have.isdisjoint(keys)
|
||||
]
|
||||
|
||||
@@ -9,6 +9,8 @@ library. Please note that all recipes are written assuming Python 3. Recipes
|
||||
*may* work under Python 2, but no guarantees!
|
||||
|
||||
|
||||
.. _pin_numbering:
|
||||
|
||||
Pin Numbering
|
||||
=============
|
||||
|
||||
@@ -18,8 +20,9 @@ configurable.
|
||||
|
||||
.. _RPi.GPIO: https://pypi.python.org/pypi/RPi.GPIO
|
||||
|
||||
Any pin marked ``GPIO`` in the diagram below can be used for generic
|
||||
components:
|
||||
Any pin marked "GPIO" in the diagram below can be used as a pin number. For
|
||||
example, if an LED was attached to "GPIO17" you would specify the pin number as
|
||||
17 rather than 11:
|
||||
|
||||
.. image:: images/pin_layout.*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user