I am using an RP pico with the 3.5" adafruit breakout board.
I can use the display with no problem until I try to initialise the sdcard when I get an error stating that I am trying to use the same SPI. That is what I am trying to do, but since the SPI is called from within the HX8357 and the sdcard programs they seem to conflict. Putting the spi definition outside the two prevents either from working. Is there any way around other than rewriting the code of the HX8357 and the sdcards in the program itself?
It is part of a water control system using LoRa on the second SPI of the pico. That works fine.
Here is the program I have written.
RP pico and Adafruit 3x5 display sdcardio fails sdcard code first.pdf (32.6 KB)
Continuing the discussion from Circuitpython 3.5" arduino breakout board display and sdcard doesn't work:
Finally I found a way to avoid duplication of the spi between the display and the sd card. It does not follow the recommendation by adafruit as that duplicates the spi declaration.
It does not follow the adafruit recommendation which causes the duplicate declaration of the spi.
My solution is highlighted in the attached code. Hopefully this helpful to others with this difficulty.
coding problem solved.pdf (28.3 KB)
I suggest changing the topic to make it more noticeable to the correct person.
I've merged your two topics on the same subject as I don't see a reason to keep two.
In future, please post your code in a post, not as an attachment and definitely not as a PDF (your attachment is around 30k, the actual code is less than 4k).