ESP32 Drive I2C-OLED -Duino

tags: Single -chip machine  stm32  Embedded hardware

ESP32 I2C-OLED display

IDE:Arduino

Foreword

  • I have made some Arduino libraries before to understand the format of the Arduino library. Originally, I planned to transplant the I2C-OLED driver of the STM32 directly. However, I kept making mistakes. I was too lazy to make wheels, so I started to record it by the way.

Hardware connection

The ESP-Weoom-32 small module is used.

iic ESP32 pin Function
SDA GPIO21 Data line
SCL GPIO22 Clock line

Get the library file

  • Link:esp8266-oled-ssd1306, Lien Library from GitHub, and then put it in the libraries folder under the Arduino path.
    image1

Primary

#include <Wire.h>
#include "SSD1306.h" 
 
SSD1306  display(0x3c, 21, 22);
 
void setup() {
 
  display.init();
  display.drawString(0, 0, "Hello World");
  display.display();
}

void loop() {}

display effect

image2

  • At the beginning, the effect was like this, and the display direction and font size had not been adjusted.

Reference information

Intelligent Recommendation

Fun with ESP32 + Arduino (8) U8G2 to drive OLED

OLED driver chip: SSD1306 Development platform: vscode+platformIO Development board: ESP32 Divkit v1 Currently the most widely used OLED library on the Arduino platform: U8G2 github address:https://gi...

ESP32 Arduino Drive 0.91 "OLED Scroll Show

Article catalog Part Displays related functions Arduino source code Reference link Part Displays related functions Adafrouit_ssd1306.h has the following code Arduino source code Reference link...

ESP32 -Duino, super fun timer!

Foreword The main program of the embedded system is basically a large cycle. If the request to handle each task in the cycle, the most rude way is to take turns inquiries, referred to as rotation, and...

0.96-inch OLED screen based on [Samsung 6818] I2C drive development

0.96-inch OLED screen based on [Samsung 6818] I2C drive development Find the original factory for the OLED screen to find the source code Change the source code adaptation Linux system (source code is...

I.MX6ULL uses the device tree to drive the 0.96 -inch I2C interface OLED

Foreword: I am a beginner developed by Linux -driven development. It is also the first time that I have written blogs. It is inevitable that there will be many uncomfortable places. The original inten...

More Recommendation

Play with ESP32 + Arduino (25) SSD1306 library to drive OLED

This time we used the following libraries: Compared with the U8G2 library, this library has a lot less functions, and the relative RAM and ROM occupancy is also less. The drawing progress bar is very ...

ESP8266 Arduino-drive SSD1306 OLED-use ESP8266 and ESP32 Oled Driver for SSD1306 display library

1. Download the peripheral library Tools->Manage library, search for ssd1306, install ESP8266 and ESP32 Oled Driver for SSD1306 display   Second, the implementation code #include <Wire.h>...

ESP32 -Duino Learning (flash memory file system)

Table of contents Flash memory file writing Flash memory file reading Flash memory delete Upload files from Arduino IDE Note: The code of this article comes from Tai Chi Maker Team: www.taichi-maker.c...

ESP32 -Duino Learning (Basic Operation of Network Clients)

Table of contents Network client operation 1-httpclient Network client operation 2-wiFiclient Note: The code of this article comes from Tai Chi Maker: www.taichi-maker.comBecause Tai Chi Maker Tutoria...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top