Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sany3001 opened this issue Nov 12, 2023 · 1 comment
Open

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

sany3001 opened this issue Nov 12, 2023 · 1 comment

Comments

@sany3001
Copy link

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

@sany3001
Copy link
Author

sany3001 commented Nov 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant