Wednesday, November 13, 2024

Interfacing OLED Display With Indusboard

OLED display is mostly used with many project and they are generally I2C based .All ESP32 chips have either I2C port or more than that and some of them even support the the software I2C that means you can softwarecally many any n on the board as I2C peripherals. So here we Interface the SSD1306 OLED display with Indusboard using its Hardware pin.

Fig. 1: Indusboard OLED

Connection

The IndusBoard has 2 I2C ports, allowing for the interfacing of multiple sensors, OLEDs, and I2C modules simultaneously. For the IndusBoard and most ESP32 chips, I2C pins can be configured either as hardware I2C or software I2C. GPIO pins 8 and 9 on the IndusBoard are configured for hardware I2C, and you can connect the OLED as follows:

IndusBoard:
5V → VCC
GND → GND
GPIO 8 → SDA
GPIO 9 → SCL

SSD1306 OLED:
VCC → 5V
GND → GND
SDA → GPIO 8
SCL → GPIO 9

Fig. 2: Indusboard pinouts
Fig. 3: Indusboard I2C pins

Connection

Several libraries are available in the Arduino IDE for interfacing with OLED displays. In this example, we’ll use the U8g2 library because it comes with various fonts and is compatible with different sizes and pixel configurations of OLED displays. Additionally, U8g2 supports both hardware and software I2C configurations.

Here’s a basic code snippet using the U8g2 library for a 128×64 pixel OLED display on hardware I2C pins:

- Advertisement -
Fig. 4
Fig. 5

Testing

Now power the Indusboard with the usba or 5V power supply usig 5V pin and you can see the display displaying texts.

Fig. 6
Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics