I'm trying to understand what kinds of buffers are allowed when creating a FramebufferDisplay. I've tried giving it the buf property of the PixelFramebuffer, but that gives me an error that a circuitpython_typing.FrameBuffer needs to be passed. Other than RGBMatrix, what other kinds of framebuffers can be passed in? Am I totally barking up the wrong tree?
In the end, I really just want to use displayio.Groups with the Dotstar 8x8.
Here is the code I'm trying to make work:
Code: Select all
import board
import adafruit_dotstar
import displayio
import framebufferio
from adafruit_pixel_framebuf import PixelFramebuffer
eye_cin = board.A0
eye_din = board.A1
eye_led_count = 64
eye_led_height = 8
eye_led_width = 8
dotstar = adafruit_dotstar.DotStar(eye_cin, eye_din, eye_led_count, brightness=0.1, auto_write=False)
pixel_framebuffer = PixelFramebuffer(pixels=dotstar, width=eye_led_width, height=eye_led_height, alternating=False)
DISPLAY = framebufferio.FramebufferDisplay(framebuffer=pixel_framebuffer.buf, rotation=0)
SPRITES = displayio.Group()
display.show(SPRITES)