Good Day Guys,
I need some assistance with connecting a Lolin ESP32 to a 7 pin SPI Oled display.
I am currently using the code and pin outs laid out in the code below but I just cannot get anything to display. VCC is connected to a 3.3V pin and not the 5v pin
[Codebox]
#include <SPI.h>
#include <Adafruit_SSD1306.h>
#define OLED_DC 13
#define OLED_CS 15
#define OLED_CLK 14
#define OLED_MOSI 27
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
void setup() {
Serial.begin(115200);
Serial.println("Setup");
display.begin(SSD1306_SWITCHCAPVCC);
display.display();
delay(2000);
display.clearDisplay();
display.display();
}
void loop() {
Serial.println("Loop");
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0,0);
display.println("Hello, world!");
display.display();
delay(1000);
}
[/Codebox]
I used the below pin out diagram to get the correct GPIO pins to reference in the code
Any help would be greatly appreciated as I have been struggling for hours with no progression.
Thanks,
Ethan
Lolin ESP32 to 7 pin SPI Oled
-
- Posts: 8
- Joined: Thu Feb 09, 2023 3:09 pm
Re: Lolin ESP32 to 7 pin SPI Oled
You should use SPI pins, which is on 18 19 23 pins. (On the right side, in light blue background)
Who is online
Users browsing this forum: No registered users and 174 guests