Hi there :), I am using an Arduino Uno R3 with an 0.96 inch OLED display (128x64px SPI) with the u8g2 library(The seller told me that the OLED worked with this library.)
It isn't I2C compatible without modifications.
It looks like I maybe have a defect display. It isn't displaying my text properly. The first couple pixel rows are missing and random pixels are printed on the last couple rows. Did I make a dumb mistake somewhere?
The OLED wiring
VCC > 5V Arduino
GND > GND Arduino
SCL > Pin 12 Arduino
SDA > Pin 11 Arduino
My code:
#include <Wire.h>
#include <U8x8lib.h> //Using u8g2 library
U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(12, 11, U8X8_PIN_NONE);
void setup() {
Serial.begin(9600);
u8x8.begin();
u8x8.clear();
u8x8.setPowerSave(0);
u8x8.setFont(u8x8_font_pxplusibmcgathin_f);
u8x8.drawString(0, 0, "Hi");
u8x8.drawString(0, 2, "12345678901");
u8x8.drawString(0, 4, "Hello World");
delay(1000);
}
void loop() {
//nothing
}