adafruit / Adafruit_CircuitPython_ILI9341

CircuitPython display driver for ILI9341
MIT License
16 stars 11 forks source link

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

Closed jpecor closed 5 years ago

jpecor commented 5 years ago

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 commented 5 years ago

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

makermelissa commented 5 years ago

Here's the guide page about this: https://learn.adafruit.com/adafruit-2-8-tft-touch-shield-v2/circuitpython-displayio-quickstart

makermelissa commented 5 years ago

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

jpecor commented 5 years ago

Thanks Melissa!