Skip to main content

Inky pHAT Driver

Project description

Inky

Build Status Coverage Status PyPi Package Python Versions

Python library for the Inky pHAT and Inky wHAT e-paper displays.

Inky pHAT

Inky pHAT is a 212x104 pixel e-paper display, available in red/black/white, yellow/black/white and black/white. It’s great for nametags and displaying very low frequency information such as a daily calendar or weather overview.

Inky wHAT

Inky wHAT is a 400x300 pixel e-paper display available in red/black/white, yellow/black/white and black/white. It’s got tons of resolution for detailed daily todo lists, multi-day weather forecasts, bus timetables and more.

Installation

The Python pip package is named inky, install with:

sudo pip install inky

Usage

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

from inky import InkyPHAT

You’ll then need to pick your colour, one of ‘red’, ‘yellow’ or ‘black’ and instantiate the class:

inkyphat = InkyPHAT('red')

If you’re using the wHAT you’ll need to load the InkyWHAT class from the Inky library like so:

from inky import InkyWHAT
inkywhat = InkyWHAT('red')

Once you’ve initialised Inky, there are only three methods you need to be concerned with:

Set Image

Set a PIL image, numpy array or list to Inky’s internal buffer. The image dimensions should match the dimensions of the pHAT or wHAT you’re using.

inkyphat.set_image(image)

You should use PIL to create an image. PIL provides an ImageDraw module which allow you to draw text, lines and shapes over your image. See: https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html

Set Border

Set the border colour of you pHAT or wHAT.

inkyphat.set_border(colour)

colour should be one of inky.RED, inky.YELLOW, inky.WHITE or inky.BLACK with available colours depending on your diplay type.

Update The Display

Once you’ve prepared and set your image, and chosen a border colour, you can update your e-ink display with:

inkyphat.show()

Migrating

If you’re migrating code from the inkyphat library you’ll find that much of the drawing and image manipulation functions have been removed from Inky. These functions were always supplied by PIL, and the recommended approach is to use PIL to create and prepare your image before setting it to Inky with set_image().

0.0.5

  • Enhancement: Added support for red/b/w high-temp Inky wHAT

0.0.4

  • BugFix: Reverted normal red LUTs to correct values

0.0.3

  • Enhancement: Added support for display variant detection

  • Enhancement: Added DocStrings

  • BugFix: Fixed set_border for all colours

0.0.2

  • BugFix: Yellow Inky pHAT now yellow instead of brown/black

  • Enhancement: Performance tweak for set_image

0.0.1

  • Initial Release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inky-0.0.5.tar.gz (9.8 kB view details)

Uploaded Source

Built Distributions

inky-0.0.5-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

inky-0.0.5-py2-none-any.whl (11.8 kB view details)

Uploaded Python 2

File details

Details for the file inky-0.0.5.tar.gz.

File metadata

  • Download URL: inky-0.0.5.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.12.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.13

File hashes

Hashes for inky-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b28471a626686cbf1adf9be15dd0532d9b22a4d4bc200de0e6725136525bf5d4
MD5 2de1394c46f301dce9370d6323d7eb8f
BLAKE2b-256 a03e6f9865d9c498db8475e8ac0bcc8f214e8355656f49ecbced86fbe542171a

See more details on using hashes here.

File details

Details for the file inky-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: inky-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.12.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.13

File hashes

Hashes for inky-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 047445867b8044b76d72d4ded26ec25fcbbd89b8f190daa05005720391028008
MD5 1aaa4cf47cf2026d97268eb9cecf4741
BLAKE2b-256 b8290ce8c4bd259a5ac4e4657686d357ba7c45810adfcf6011ae84ac730bd1ad

See more details on using hashes here.

File details

Details for the file inky-0.0.5-py2-none-any.whl.

File metadata

  • Download URL: inky-0.0.5-py2-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.12.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.13

File hashes

Hashes for inky-0.0.5-py2-none-any.whl
Algorithm Hash digest
SHA256 d89c97b70eec1017fa51775c18c140f5e3c2218dd9ff78dffe2fe587bc1e98c3
MD5 05da4d6fcd018419b3335b168f922562
BLAKE2b-256 88b9562fdebbbc0cb6f4781687dd9be31161efb7048b2127c5ec22d847747362

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page