Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use WEMOS LOLIN32 OLED: Examples, Pinouts, and Specs

Image of WEMOS LOLIN32 OLEDDesign with WEMOS LOLIN32 OLED in Cirkit Designer

Introduction

The WEMOS LOLIN32 OLED is a versatile and powerful development board that combines the advanced features of the ESP32 microcontroller with the convenience of an integrated OLED display. This board is ideal for IoT projects, wearable devices, and any application where visual feedback is beneficial. With built-in Wi-Fi and Bluetooth capabilities, the WEMOS LOLIN32 OLED is perfect for creating connected devices.

Explore Projects Built with WEMOS LOLIN32 OLED

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Powered OLED Display with 18650 Battery: A project utilizing WEMOS LOLIN32 OLED in a practical application
ESP32-Powered OLED Display with 18650 Battery

This circuit features an ESP32 microcontroller powered by a single 18650 battery, which drives a 0.96" OLED display. The ESP32 communicates with the OLED via I2C protocol, using GPIO21 and GPIO22 as SDA and SCL lines, respectively. The purpose of the circuit is to display the message 'Hello, World!' on the OLED screen.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Number Function Description
1 GND Ground
2 3V3 3.3V power supply
3 EN Reset pin, active low
4 VP 36, ADC, Capacitive touch
5 VN 39, ADC, Capacitive touch
6 IO34 34, ADC
7 IO35 35, ADC
8 IO32 32, ADC, DAC, Capacitive touch
9 IO33 33, ADC, DAC, Capacitive touch
10 IO25 25, ADC, DAC
11 IO26 26, ADC, DAC
12 IO27 27, ADC, Capacitive touch
13 IO14 14, ADC, Capacitive touch, SPI
14 IO12 12, ADC, Capacitive touch, SPI
15 IO13 13, ADC, Capacitive touch, SPI
16 IO9 9, SPI
17 IO10 10, SPI
18 IO11 11, SPI
19 IO6 6, SPI
20 IO7 7, SPI
21 IO8 8, SPI
22 IO23 23, SPI
23 IO22 22, I2C
24 TX0 UART
25 RX0 UART
26 IO5 5, SPI
27 IO18 18, SPI
28 IO19 19, SPI
29 IO21 21, I2C
30 GND Ground
31 5V 5V power supply via USB

Usage Instructions

How to Use the Component in a Circuit

  1. Powering the Board:

    • Connect the micro USB cable to the board and your computer or a 5V USB power source.
    • Ensure that the input voltage does not exceed the recommended 5V.
  2. Connecting to the OLED Display:

    • The OLED display is built-in and requires no additional wiring.
    • The display is controlled via the I2C interface, typically using GPIO pins 4 (SDA) and 15 (SCL).
  3. Programming the Board:

    • Install the latest version of the Arduino IDE.
    • Install the ESP32 board package using the Board Manager.
    • Select the appropriate board and port in the Arduino IDE.
    • Write your sketch and upload it to the board.

Important Considerations and Best Practices

Troubleshooting and FAQs

Common Issues Users Might Face

Solutions and Tips for Troubleshooting

Example Code for Arduino UNO

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

// OLED display TWI address
#define OLED_ADDR   0x3C
// Reset pin not used on 4-pin OLED module
Adafruit_SSD1306 display(-1);

// Initialize with the I2C addr 0x3C (for the 128x64)
// Always reset the display at the beginning
void setup() {
  Wire.begin(5, 4); // Initialize I2C
  display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
  display.display();
  delay(2000); // Pause for 2 seconds
  display.clearDisplay();
}

void loop() {
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println(F("Hello, world!"));
  display.display();
  delay(2000);
  display.clearDisplay();
}

Note: This example assumes the use of the Adafruit SSD1306 library for the OLED display. Ensure that the library is installed in the Arduino IDE before compiling and uploading the sketch. The I2C pins are defined as GPIO 5 (SDA) and GPIO 4 (SCL) in the Wire.begin(5, 4); statement. Adjust these pin numbers if your board uses different pins for I2C communication.