You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.4 KiB

SSD1306 OLED 128x64 Display

The ESP32 has two Hardware supported SPI Buses. This project makes use of the VSPI Bus(id = 2) to drive the Adafruit ssd1306 OLED Display.

PIN Outs

Channel ESP32 OLED Comments
MISO Master in slave out. Unused
MOSI D23 : GPIO23 Data Master out slave in.
SCK D18 : GPIO18 Clk Clock.
DC D4 : GPIO4 DC
CS D5 : GPIO5 CS Chip select.
RST D2 : GPIO2 Rst Reset.
V+ 3v3 Vin
GND GND Gnd

Usage

The SSD1306_SPI driver has a simple interface.

To clear the screen:

oled.fill(0)
oled.show()

To invert colors:

oled.invert(True)

A DisplayWriter was added as a convenience to writing out messages to the OLED. Use this for printing text messages to the display. Newline characters will dwa