Skip to content

Commit

Permalink
Update docs for auto and favour Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Aug 12, 2020
1 parent e162cb3 commit b8e0e19
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 4 deletions.
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,42 @@ Python library for the [Inky pHAT](https://shop.pimoroni.com/products/inky-phat)

# Installation

The Python pip package is named inky, install with:
The Python pip package is named inky, on the Raspberry Pi install with:

```
sudo pip install inky
pip3 install inky[rpi,fonts]
```

This will install Inky along with dependencies for the Raspberry Pi, plus fonts used by the examples.

If you want to simulate Inky on your desktop, use:

```
pip3 install inky
```

You may need to use `sudo pip3` or `sudo pip` depending on your environment and Python version.

# Usage

## Auto Setup

Inky can try to automatically detect your board and set up accordingly:

```python
from inky.auto import auto
board = auto()
```

You can then get the colour and resolution from the board:

```python
board.colour
board.resolution
```

## Manual Setup

The Inky library contains modules for both the pHAT and wHAT, load the InkyPHAT one as follows:

```python
Expand Down
36 changes: 34 additions & 2 deletions library/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,47 @@ and more.
Installation
============

The Python pip package is named inky, install with:
The Python pip package is named inky, on the Raspberry Pi install with:

::

sudo pip install inky
pip3 install inky[rpi,fonts]

This will install Inky along with dependencies for the Raspberry Pi,
plus fonts used by the examples.

If you want to simulate Inky on your desktop, use:

::

pip3 install inky

You may need to use ``sudo pip3`` or ``sudo pip`` depending on your
environment and Python version.

Usage
=====

Auto Setup
----------

Inky can try to automatically detect your board and set up accordingly:

.. code:: python
from inky.auto import auto
board = auto()
You can then get the colour and resolution from the board:

.. code:: python
board.colour
board.resolution
Manual Setup
------------

The Inky library contains modules for both the pHAT and wHAT, load the
InkyPHAT one as follows:

Expand Down

0 comments on commit b8e0e19

Please sign in to comment.