Page 1 of 1

Trouble mapping hardware SPI pins on ESP-32 S3 board for oled

Posted: Mon Jan 29, 2024 5:21 am
by arcadeperfect
Hi
I have this mini ESP32-S3 board
https://www.waveshare.com/esp32-s3-zero.htm

and this spi oled display
https://www.amazon.com/dp/B0711RKXB5?ps ... ct_details

The pinout lists basically all the pins as SPI, and as far as I can tell it allows you to map the hardware SPI pins? Is that correct?

However with the following example sketch I can't get it to work in hardware spi mode.
https://github.com/adafruit/Adafruit-SS ... LCDGFXDemo

The Adafruit_SSD1331 driver seems to accept pin definitions mosi and sclk only in software mode. In hardware mode it accepts an instance of SPIClass instead.

I am assuming that usually the appropriate pins are hard coded somewhere for hardware pins? How can I assign pins for mosi and sclk?

Alternatively, if the SPI pins are not mappable, how can I find the appropriate pins? i can't find a pinout that lists them.

Re: Trouble mapping hardware SPI pins on ESP-32 S3 board for oled

Posted: Mon Jan 29, 2024 9:29 am
by lbernstone
Most libraries will either accept an SPI object as a parameter, or assume you are using "SPI".
So, call SPI.begin with your pin definitions before you initialize the oled library, and it should just work.