adafruit / Adafruit_CircuitPython_ST7565

A display control library for ST7565 graphic displays
MIT License
6 stars 3 forks source link

Example is not working with CircuitPython 9.0.0-alpha.2 #8

Open sany3001 opened 10 months ago

sany3001 commented 10 months ago

When trying to run example (using Mu editor), I have got this error: AttributeError: 'module' object has no attribute 'SCL'

sany3001 commented 10 months ago

I have solved this by using "GP" names:

# busio.SPI(clock: microcontroller.Pin, MOSI: microcontroller.Pin | None = None, MISO: microcontroller.Pin | None = None, half_duplex: bool = False)
spi = busio.SPI(clock=board.GP6, MOSI=board.GP7)
dc = digitalio.DigitalInOut(board.GP5)  # data/command
cs = digitalio.DigitalInOut(board.GP4)  # Chip select
reset = digitalio.DigitalInOut(board.GP9)  # reset
...
backlight = digitalio.DigitalInOut(board.GP10)  # backlight