Fix #459 - properly support remote SPI with pigpio

Sorry! Dave's messing around with the pin implementations again.
Hopefully the last time. The pin_factory is now really a factory object
which can be asked to produce individual pins or pin-based interfaces
like SPI (which can be supported properly via pigpio).
This commit is contained in:
Dave Jones
2016-09-27 00:30:57 +01:00
parent 0ca2586e9e
commit ce6217c14f
34 changed files with 2311 additions and 1456 deletions

View File

@@ -9,7 +9,7 @@ library. Please note that all recipes are written assuming Python 3. Recipes
*may* work under Python 2, but no guarantees!
.. _pin_numbering:
.. _pin-numbering:
Pin Numbering
=============
@@ -429,7 +429,9 @@ functionality without the need to wire up your own LEDs (also useful because
the power and activity LEDs are "known good").
Firstly you need to disable the usual triggers for the built-in LEDs. This can
be done from the terminal with the following commands::
be done from the terminal with the following commands:
.. code-block:: console
$ echo none | sudo tee /sys/class/leds/led0/trigger
$ echo gpio | sudo tee /sys/class/leds/led1/trigger
@@ -439,7 +441,9 @@ Now you can control the LEDs with gpiozero like so:
.. literalinclude:: examples/led_builtin.py
To revert the LEDs to their usual purpose you can either reboot your Pi or
run the following commands::
run the following commands:
.. code-block:: console
$ echo mmc0 | sudo tee /sys/class/leds/led0/trigger
$ echo input | sudo tee /sys/class/leds/led1/trigger