mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Formatting fixes
This commit is contained in:
@@ -5,10 +5,9 @@ Source Tools
|
||||
.. currentmodule:: gpiozero.tools
|
||||
|
||||
GPIO Zero includes several utility routines which are intended to be used with
|
||||
the :attr:`~gpiozero.SourceMixin.source` and
|
||||
:attr:`~gpiozero.ValuesMixin.values` attributes common to most devices in the
|
||||
library. These utility routines are in the ``tools`` module of GPIO Zero and
|
||||
are typically imported as follows::
|
||||
the :doc:`source_values` attributes common to most devices in the library. These
|
||||
utility routines are in the ``tools`` module of GPIO Zero and are typically
|
||||
imported as follows::
|
||||
|
||||
from gpiozero.tools import scaled, negated, all_values
|
||||
|
||||
@@ -76,4 +75,3 @@ Artificial sources
|
||||
.. autofunction:: random_values
|
||||
|
||||
.. autofunction:: sin_values
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ version of gpiozero is available in your Python environment like so::
|
||||
|
||||
>>> from pkg_resources import require
|
||||
>>> require('gpiozero')
|
||||
[gpiozero 1.2.0 (/usr/local/lib/python2.7/dist-packages)]
|
||||
[gpiozero 1.3.2 (/usr/lib/python3/dist-packages)]
|
||||
>>> require('gpiozero')[0].version
|
||||
'1.2.0'
|
||||
'1.3.2'
|
||||
|
||||
If you have multiple versions installed (e.g. from ``pip`` and ``apt``) they
|
||||
will not show up in the list returned by the ``require`` method. However, the
|
||||
@@ -90,9 +90,9 @@ import.
|
||||
If you receive the error "No module named pkg_resources", you need to install
|
||||
the ``pip`` utility. This can be done with the following command in Raspbian::
|
||||
|
||||
$ sudo apt install python-pip
|
||||
sudo apt install python-pip
|
||||
|
||||
Alternatively, install pip with `get-pip`_.
|
||||
|
||||
|
||||
.. get_pip: https://pip.pypa.io/en/stable/installing/
|
||||
.. _get_pip: https://pip.pypa.io/en/stable/installing/
|
||||
|
||||
@@ -37,7 +37,7 @@ Multi-room doorbell
|
||||
===================
|
||||
|
||||
Install a Raspberry Pi with a buzzer attached in each room you want to hear the
|
||||
doorbell, and use a push button ad the doorbell::
|
||||
doorbell, and use a push button ad the doorbell:
|
||||
|
||||
.. literalinclude:: examples/multi_room_doorbell.py
|
||||
|
||||
|
||||
@@ -39,14 +39,14 @@ Then launch the pigpio daemon::
|
||||
sudo pigpiod
|
||||
|
||||
To only allow connections from a specific IP address, use the ``-n`` flag. For
|
||||
example:
|
||||
example::
|
||||
|
||||
sudo pigpiod -n localhost # allow localhost only
|
||||
sudo pigpiod -n 192.168.1.65 # allow 192.168.1.65 only
|
||||
sudo pigpiod -n localhost -n 192.168.1.65 # allow localhost and 192.168.1.65 only
|
||||
|
||||
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::
|
||||
|
||||
???
|
||||
|
||||
@@ -77,7 +77,7 @@ Alternatively, install with pip::
|
||||
|
||||
sudo pip3 install pigpio
|
||||
|
||||
or:
|
||||
or::
|
||||
|
||||
sudo pip install pigpio
|
||||
|
||||
|
||||
Reference in New Issue
Block a user