Author Topic: Multiple SPI Devices  (Read 879 times)


  • RFduino Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Multiple SPI Devices
« on: November 11, 2015, 07:22:38 PM »
I want to connect a SSD1306 OLED screen (by Adafruit) along with a SD card.   I have the OLED screen to working (via hardware SPI) and the SD card example (using the old version of SD.h) separately.

So I tried to run the SD example separately by changing chipSelect = 2 in the code, and connecting the CS/SS pin to GPIO2, and my example no longer works ("Card failed, or not present"). It seems like the SD.h library only works for GPIO6 as SS.

I guess if I change the SS designation to (2u) in variant.h, GPIO2 will work. But I would like to have multiple SS so that I can run both SPI devices.

Any ideas? Thanks.