I just bought one of these LCDs.
https://www.aliexpress.us/item/2255799816264653.html?spm=a2g0o.order_list.order_list_main.4.42d01802kpCams&gatewayAdapt=glo2usa&_randl_shipto=US
I got the 7-pin SPI version. I wired it up to my arduino nano, and nothing. Nothing lights up. I tried this code:
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SPI.h>
#define OLED_CS 10
#define OLED_DC 9
#define OLED_RESET 8
Adafruit_SSD1306 display(OLED_RESET);
void setup() {
// initialize the SPI bus
SPI.begin();
SPI.setClockDivider(SPI_CLOCK_DIV4);
// initialize the SSD1309 display
display.begin(SSD1306_SWITCHCAPVCC, OLED_CS, OLED_DC, OLED_RESET);
// add a delay to give the display time to initialize
delay(1000);
// clear the display buffer
display.clearDisplay();
// set text size and color
display.setTextSize(2);
display.setTextColor(WHITE);
// print some text
display.setCursor(0, 0);
display.println("Hello, world!");
display.display();
}
void loop() {
// nothing to do here
}
and still nothing. The documentation is in the description on the aliexpress site. It doesn't state what drivers to use. ChatGPT suggested using these libraries:
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <SPI.h>
What am i doing wrong here? The wiring all seems good. I've tried VDD to 3.3V and 5V. VSS to GND. But still nothing.