Display OLED SSD1306 with LilyGO T-Beam

esp32 t-beam lilygo display oled ssd1306

This example contains the code to display a bunch of Hello world on the OLED display SSD1306.

  1. Install Arduino library dependancy for the OLED display SSD1306

     arduino-cli lib install "ESP8266 and ESP32 OLED driver for SSD1306 displays"
    
  2. Run make to compile and upload the code
  3. Connect to the serial monitor

Code

Download code
#include "src/oled/oled.h"

void setup() {
  Serial.begin(9600);
  initOLED();
}

void loop() {
  Serial.print("Updating display at ");
  Serial.print(millis());
  Serial.println("ms");

  displayOLED();
  delay(2000);
}

Serial console

Serial output from the firmware.

Display OLED SSD1306 with LilyGO T-Beam serial console

Prototype

A photo of the actual setup.

Display OLED SSD1306 with LilyGO T-Beam prototype

References