adafruit / Adafruit_CircuitPython_RGB_Display

Drivers for RGB displays for Adafruit CircuitPython.
MIT License
131 stars 52 forks source link

Usage with displayio? #63

Closed philippkeller closed 4 years ago

philippkeller commented 4 years ago

I'm trying to use adafruit-circuitpython-display-text in combination with this repo.

I found the following code in this video

import board
import displayio
from st7735r import ST7735R

spi = board.SPI()
cs = board.D11
dc = board.D10

displayio.release_displays()
display_bus = displayio.FourWire(spi, command=dc, chip_select=cs, reset=board.D9)

display = ST7735R(display_bus, width=128, height=160)

Is something like this possible? Or should I use this repo instead?

I tried using the code, but I can't import displayio and I have no idea what pip package provides displayio.

ladyada commented 4 years ago

yep use the other one, this is for linux/python use :)

philippkeller commented 4 years ago

@ladyada I want to use it on a raspberrypi, so it's linux. Also I have a ST7735S (waveshare 1.8inch). Should I still the other repo? That means I adapt it to use the ST7735S init sequence?

ladyada commented 4 years ago

oh for a Pi, yeah use this repo - but you cannot use displayio! we have not used ST7735S so not sure how to get it working.

philippkeller commented 4 years ago

for whoever stumbles upon this: As far as I understand the things are as following:

For the Raspberry PI the circuitpython modules have been "side ported" in adafruit-blinka. However, this only includes a few modules (e.g. busio, board, etc.) but not displayio.

For using ~digitalio~ displayio you'd need to develop on circuitpython hardware (e.g. Adafruit devices).

ladyada commented 4 years ago

digitalio is supported. displayio is not

philippkeller commented 4 years ago

thanks for spotting the mistake, updated my comment

caternuson commented 4 years ago

There's an open issue for displayio in Blinka: https://github.com/adafruit/Adafruit_Blinka/issues/109