Add pin_factory param to all devices

And some docs ...
This commit is contained in:
Dave Jones
2017-07-14 10:44:24 +01:00
parent 1ca017fc6d
commit 8958874a77
16 changed files with 619 additions and 196 deletions

View File

@@ -36,7 +36,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
@@ -46,7 +48,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