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

arcadeperfect
Posts: 1
Joined: Mon Jan 29, 2024 5:15 am

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

Postby arcadeperfect » Mon Jan 29, 2024 5:21 am

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.

lbernstone
Posts: 826
Joined: Mon Jul 22, 2019 3:20 pm

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

Postby lbernstone » Mon Jan 29, 2024 9:29 am

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.

Who is online

Users browsing this forum: Google [Bot] and 64 guests