connection of OLED display to ESP32 feather using SPI

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
j_hofland
 
Posts: 7
Joined: Sat Sep 09, 2017 5:23 pm

connection of OLED display to ESP32 feather using SPI

Post by j_hofland »

First time trying to use Arduino to interface ESP32 feather with 0.96" OLED using SPI.
Which ESP32 pins should be used for D/C, CS, and RST and how do I assign the when running the demo program?

User avatar
adafruit_support_carter
 
Posts: 29483
Joined: Tue Nov 29, 2016 2:45 pm

Re: connection of OLED display to ESP32 feather using SPI

Post by adafruit_support_carter »

Which specific OLED are you using? Can you link to product page. Hopefully it's covered in the product guide, but first want to make sure which exact OLED you have.

User avatar
j_hofland
 
Posts: 7
Joined: Sat Sep 09, 2017 5:23 pm

Re: connection of OLED display to ESP32 feather using SPI

Post by j_hofland »

The OLED is #326, 128x64, 0.96". I have cut the internal traces that configure it for I2C and pinned it for SPI. I also have one of the #2719 2.4" display but figure I would try the smaller one forst.

User avatar
adafruit_support_carter
 
Posts: 29483
Joined: Tue Nov 29, 2016 2:45 pm

Re: connection of OLED display to ESP32 feather using SPI

Post by adafruit_support_carter »

The Feather ESP32 pinouts are documented here:
https://learn.adafruit.com/adafruit-huz ... er/pinouts

Here's the example to try for that OLED in SPI mode:
https://github.com/adafruit/Adafruit_SS ... 64_spi.ino

You can either use software SPI and configure it to use any available GPIO pins:

Code: Select all

// Declaration for SSD1306 display connected using software SPI (default case):
#define OLED_MOSI   9
#define OLED_CLK   10
#define OLED_DC    11
#define OLED_CS    12
#define OLED_RESET 13
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,
  OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
Or use hardware SPI specifying GPIO pins for DC, CS, and RESET:

Code: Select all

#define OLED_DC     6
#define OLED_CS     7
#define OLED_RESET  8
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,
  &SPI, OLED_DC, OLED_RESET, OLED_CS);

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”