Skip to content

"SCK in use" error with Metro M4 Express and 2.8 TFT running ili9341_shield_simpletest.py #14

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

Closed
jpecor opened this issue Oct 1, 2019 · 4 comments · Fixed by #15
Closed

Comments

@jpecor
Copy link

jpecor commented Oct 1, 2019

I was trying to recreate a PyPortal bug today with a Metro M4 Express and a 2.8" TFT shield. I grabbed the ili9341_shield_simpletest.py example code and got this error:

code.py output: Traceback (most recent call last): File "code.py", line 17, in <module> ValueError: SCK in use

If I change from this:
spi = board.SPI()

to this (including the import of busio):
spi = busio.SPI(board.D13, board.D11)

the program runs correctly.

@makermelissa
Copy link
Collaborator

Hi. With the Metro M4 Express, you need to use the ICSP header to access the SPI pins rather than Pins 11-13.

@makermelissa
Copy link
Collaborator

@makermelissa
Copy link
Collaborator

Reopening because after talking with Jason, adding the Software SPI as an option into the example is a good idea.

@jpecor
Copy link
Author

jpecor commented Oct 1, 2019

Thanks Melissa!

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

Successfully merging a pull request may close this issue.

2 participants