adafruit_pixel_framebuf

Neopixel and Dotstar Framebuffer Helper

  • Author(s): Melissa LeBlanc-Williams

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_pixel_framebuf.PixelFramebuffer(pixels: int | Tuple[int, int, int] | Tuple[int, int, int, int], width: int, height: int, orientation: int = 1, alternating: bool = True, reverse_x: bool = False, reverse_y: bool = False, top: int = 0, bottom: int = 0, rotation: int = 0)

NeoPixel and Dotstar FrameBuffer for easy drawing and text on a grid of either kind of pixel

Parameters:
  • strip – An object that implements the Neopixel or Dotstar protocol.

  • width – Framebuffer width.

  • height – Framebuffer height.

  • orientation – Orientation of the strip pixels - HORIZONTAL (default) or VERTICAL. HORIZONTAL and VERTICAL are primitive integers created by micropython.const(x).

  • alternating – Whether the strip alternates direction from row to row (default True).

  • reverse_x – Whether the strip X origin is on the right side (default False).

  • reverse_y – Whether the strip Y origin is on the bottom (default False).

  • top (tuple) – (x, y) coordinates of grid top left corner (Optional)

  • bottom (tuple) – (x, y) coordinates of grid bottom right corner (Optional)

  • rotation (int) – A value of 0-3 representing the rotation of the framebuffer (default 0)

blit() None

blit is not yet implemented

display() None

Copy the raw buffer changes to the grid and show