Fix env var for pigpio

Also provide example for starting pigpiod on boot.
This commit is contained in:
rgm
2017-04-21 11:20:11 -05:00
parent c05fc2e570
commit 0115cce324

View File

@@ -48,7 +48,7 @@ example::
You will need to launch the pigpio daemon every time you wish to use this You will need to launch the pigpio daemon every time you wish to use this
feature. To automate running the daemon at boot time:: feature. To automate running the daemon at boot time::
??? sudo systemctl enable pigpiod
Preparing the host computer Preparing the host computer
=========================== ===========================
@@ -149,7 +149,7 @@ ensure the default pin factory is set to ``PiGPIOPin``. If ``RPi.GPIO`` is
installed, this will be selected as the default pin factory, so either uninstall installed, this will be selected as the default pin factory, so either uninstall
it, or use another environment variable to set it to ``PiGPIOPin``:: it, or use another environment variable to set it to ``PiGPIOPin``::
$ GPIOZERO_PIN_FACTORY=pigpio PIGPIO_ADDR=192.168.1.3 python3 hello.py $ GPIOZERO_PIN_FACTORY=PiGPIOPin PIGPIO_ADDR=192.168.1.3 python3 hello.py
This usage will set the pin factory to :class:`PiGPIOPin` with a default host of This usage will set the pin factory to :class:`PiGPIOPin` with a default host of
``192.168.1.3``. The pin factory can be changed inline in the code, as seen in ``192.168.1.3``. The pin factory can be changed inline in the code, as seen in
@@ -212,7 +212,7 @@ environment variables, or by using :meth:`~Device._set_pin_factory`:
.. literalinclude:: examples/traffichat_remote_1.py .. literalinclude:: examples/traffichat_remote_1.py
This also allows you to swap between two IP addresses and create instances of This also allows you to swap between two IP addresses and create instances of
mutliple HATs connected to different Pis: multiple HATs connected to different Pis:
.. literalinclude:: examples/traffichat_remote_2.py .. literalinclude:: examples/traffichat_remote_2.py