Inky pHAT¶
Inky pHAT class and methods.
A getting started tutorial for the Inky pHAT is available on the pimoroni website.
The pinout for the Inky pHAT is documented on pinout.xyz
- class inky.InkyPHAT(colour='black')[source]¶
Inky pHAT e-Ink Display Driver.
- Example:
>>> from inky import InkyPHAT >>> display = InkyPHAT('red') >>> display.set_border(display.BLACK) >>> for x in range(display.WIDTH): >>> for y in range(display.HEIGHT): >>> display.set_pixel(x, y, display.RED) >>> display.show()
Initialise an Inky pHAT Display.
- Parameters:
colour (str) – one of ‘red’, ‘black’ or ‘yellow’, default: ‘black’.
- set_border(colour)¶
Set the border colour.
- Parameters:
colour (int) – The border colour. Valid values are inky.BLACK, inky.WHITE, inky.RED and inky.YELLOW.
- set_image(image)¶
Copy an image to the buffer.
The dimensions of image should match the dimensions of the display being used.
- Parameters:
image (
PIL.Image.Image
ornumpy.ndarray
or list) – Image to copy.
- set_pixel(x, y, v)¶
Set a single pixel on the buffer.
- setup()¶
Set up Inky GPIO and reset display.