From d3ee0c0102b5f2e38747fb8cc6f2606d2641d8ef Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Fri, 14 Jul 2017 23:07:32 +0100 Subject: [PATCH] Switch pin numbering / import ordering Makes more sense, slightly better print layout --- docs/recipes.rst | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/recipes.rst b/docs/recipes.rst index 0a05a2c..b04fffe 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -8,24 +8,6 @@ The following recipes demonstrate some of the capabilities of the GPIO Zero library. Please note that all recipes are written assuming Python 3. Recipes *may* work under Python 2, but no guarantees! -.. _pin-numbering: - -Pin Numbering -============= - -This library uses Broadcom (BCM) pin numbering for the GPIO pins, as opposed -to physical (BOARD) numbering. Unlike in the `RPi.GPIO`_ library, this is not -configurable. - -.. _RPi.GPIO: https://pypi.python.org/pypi/RPi.GPIO - -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.* - :align: center - Importing GPIO Zero =================== @@ -52,6 +34,24 @@ In this case, all references to items within GPIO Zero must be prefixed:: button = gpiozero.Button(2) +.. _pin-numbering: + +Pin Numbering +============= + +This library uses Broadcom (BCM) pin numbering for the GPIO pins, as opposed +to physical (BOARD) numbering. Unlike in the `RPi.GPIO`_ library, this is not +configurable. + +.. _RPi.GPIO: https://pypi.python.org/pypi/RPi.GPIO + +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.* + :align: center + LED ===