mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Replace apt-get with apt
and other miscellaneous changes
This commit is contained in:
@@ -32,7 +32,7 @@ within a virtual Python environment:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ sudo apt-get install lsb-release build-essential git git-core \
|
$ sudo apt install lsb-release build-essential git git-core \
|
||||||
> exuberant-ctags virtualenvwrapper python-virtualenv python3-virtualenv \
|
> exuberant-ctags virtualenvwrapper python-virtualenv python3-virtualenv \
|
||||||
> python-dev python3-dev
|
> python-dev python3-dev
|
||||||
$ cd
|
$ cd
|
||||||
@@ -89,7 +89,7 @@ command should install all required dependencies:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ sudo apt-get install texlive-latex-recommended texlive-latex-extra \
|
$ sudo apt install texlive-latex-recommended texlive-latex-extra \
|
||||||
texlive-fonts-recommended graphviz inkscape
|
texlive-fonts-recommended graphviz inkscape
|
||||||
|
|
||||||
Once these are installed, you can use the "doc" target to build the
|
Once these are installed, you can use the "doc" target to build the
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ example::
|
|||||||
b = Button(17)
|
b = Button(17)
|
||||||
b.when_pressed = pushed()
|
b.when_pressed = pushed()
|
||||||
|
|
||||||
In the case above, when assigning to the ``when_pressed``, the thing that is
|
In the case above, when assigning to ``when_pressed``, the thing that is
|
||||||
assigned is the *result of calling* the ``pushed`` function. Because ``pushed``
|
assigned is the *result of calling* the ``pushed`` function. Because ``pushed``
|
||||||
doesn't explicitly return anything, the result is ``None``. Hence this is
|
doesn't explicitly return anything, the result is ``None``. Hence this is
|
||||||
equivalent to doing::
|
equivalent to doing::
|
||||||
@@ -113,7 +113,7 @@ suppress the warnings you've got a couple of options:
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ GPIOZERO_PIN_FACTORY=pigpio python
|
$ GPIOZERO_PIN_FACTORY=pigpio python3
|
||||||
|
|
||||||
In this case no warning is issued because there's no fallback; either the
|
In this case no warning is issued because there's no fallback; either the
|
||||||
specified factory loads or it fails in which case an :exc:`ImportError` will
|
specified factory loads or it fails in which case an :exc:`ImportError` will
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ Installing GPIO Zero
|
|||||||
|
|
||||||
GPIO Zero is installed by default in `Raspbian Jessie`_ and `Raspbian x86`_,
|
GPIO Zero is installed by default in `Raspbian Jessie`_ and `Raspbian x86`_,
|
||||||
available from `raspberrypi.org`_. Follow these guides to installing on other
|
available from `raspberrypi.org`_. Follow these guides to installing on other
|
||||||
operating systems, including for PCs using the :doc:`remote GPIO </remote_gpio>` feature.
|
operating systems, including for PCs using the :doc:`remote GPIO <remote_gpio>`
|
||||||
|
feature.
|
||||||
|
|
||||||
Raspberry Pi
|
Raspberry Pi
|
||||||
============
|
============
|
||||||
|
|||||||
@@ -167,7 +167,8 @@ controlled:
|
|||||||
|
|
||||||
.. literalinclude:: examples/led_board_2.py
|
.. literalinclude:: examples/led_board_2.py
|
||||||
|
|
||||||
See more :class:`LEDBoard` examples in :doc:`recipes_advanced`.
|
See more :class:`LEDBoard` examples in the :ref:`advanced LEDBoard recipes
|
||||||
|
<ledboard-advanced>`.
|
||||||
|
|
||||||
LEDBarGraph
|
LEDBarGraph
|
||||||
===========
|
===========
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ The following recipes demonstrate some of the capabilities of the GPIO Zero
|
|||||||
library. Please note that all recipes are written assuming Python 3. Recipes
|
library. Please note that all recipes are written assuming Python 3. Recipes
|
||||||
*may* work under Python 2, but no guarantees!
|
*may* work under Python 2, but no guarantees!
|
||||||
|
|
||||||
|
.. _ledboard-advanced:
|
||||||
|
|
||||||
LEDBoard
|
LEDBoard
|
||||||
========
|
========
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user