# Inky wHAT

Inky wHAT class and methods.

A getting started tutorial for the Inky wHAT is available on the pimoroni website.

class inky.InkyWHAT(colour='black')

  Inky wHAT e-Ink Display Driver.

  Example:

        >>> from inky import InkyWHAT
        >>> display = InkyWHAT('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 wHAT 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` or `numpy.ndarray` or list) – Image to copy.

  set_pixel(x, y, v)

    Set a single pixel on the buffer.

    Parameters:

      - x (int) – x position on display.

      - y (int) – y position on display.

      - v (int) – Colour to set, valid values are inky.BLACK, inky.WHITE, inky.RED and inky.YELLOW.

  setup()

    Set up Inky GPIO and reset display.

  show(busy_wait=True)

    Show buffer on display.

    Parameters:

      busy_wait (bool) – If True, wait for display update to finish before returning, default: True.