Table of Contents:
- 1 Introduction:
- 2 PCBway:
- 3 Required components:
- 4 Circuit Diagram:
- 5 Installing ESP32 Add-on, Programming part.
- 6 Uploading Source Code:
- 7 Video Tutorial: Playing Videos on 128X64 OLED Display with ESP32
In this Tutorial “Playing Videos on 128X64 OLED Display with ESP32”, we will see how to play any videos on OLED Display.
Till now we would have seen printing letters, Scrolling text, Decimal, Hexadecimal, Binary numbers, and Different type of shapes on OLED Display.
but what about playing video OLED Display??? Sounds interesting right, That’s why I’m here. In this video, we will see how to play videos on OLED Display.
This project is sponsored by PCBway.com, PCBWAY is one of the best PCB manufacturers in the current industry.
PCBway is offering services like PCB prototype, SMD Stencil, PCB assembly, Flexible PCBs & Advanced PCBs.
At PCBway.com we can get 10 pieces of 2 layered PCBs at just $5 with 24 hours build time.
The Best part of PCBway is the Instant quote feature, just enter the PCB size, choose the quantity, layers, and thickness. That’s it, we will get the instant quote. place an order by clicking on saving to cart.
This tutorial is also available in the video format, you can watch the below video or continue reading this article.
0.96″ I2C OLED Display:
This is a 0.96 inch blue OLED display module. The display module can be interfaced with any microcontroller using SPI/IIC protocols. It is having a resolution of 128×64. The package includes display board, display,4 pin male header pre-soldered to board.
OLED (Organic Light-Emitting Diode) is a self light-emitting technology composed of a thin, multi-layered organic film placed between an anode and cathode. In contrast to LCD technology, OLED does not require a backlight. OLED possesses high application potential for virtually all types of displays and is regarded as the ultimate technology for the next generation of flat-panel displays.
- OLED Driver IC: SSD1306
- Resolution: 128 x 64
- Visual Angle: >160°
- Input Voltage: 3.3V ~ 6V
- Compatible I/O Level: 3.3V, 5V
- Mini Size: 2.7 x 2.8cm
- Only Need 2 I/O Port to Control
- Fully Compatible with Arduino
- Working temperature: -30°C ~ 70°C
- Module volume ( generous ): 27.0 x 27.0 x 4.1mm
- Factory configured for SPI protocol (can be easily changed to IIC)
For more information about the SSD1306 OLED Display, check out this datasheet.
Here we are using 128×64 pixels I2C OLED Display, It has a total of 8192 pixels, which can be programmed individually to turn on and off.
All these pixels are uniformly distributed over the display.
If we take a closer look at the display, we can observe that each pixel is nothing but a tiny LED.
As I have explained in one of my previous Article, We can print anything on this display by glowing the exact pattern of pixels or LEDs and keep the rest of the Pixels in Off state.
Coming to playing videos on this display we will use simple logic. A video is nothing but a Sequence of pictures. So, we will extract the frames from the video, and play them with very little delay, so that our eye can feel that video is playing.
Connect OLED Display with ESP32 as shown in the below picture.
Installing ESP32 Add-on, Programming part.
We’ll program the ESP32 using Arduino IDE. So, we should have the esp32 addon installed in our Arduino Ide.
1. ESP32 add-on Arduino IDE.
In this example, we use the Arduino IDE to program the ESP32 board. So, we need to have Arduino IDE installed as well as the ESP32 add-on. If you haven’t installed the ESP32 add-on in your machine, follow the below tutorials and get it installed.
2. Source Code: Playing Videos on 128X64 OLED Display with ESP32
Download the code from below Git hub link for Playing Videos on 128X64 OLED Display with ESP32. I have clearly explained the code in the video tutorial. You can find the video tutorial at last of the article.
Before going to upload the code Install all the libraries. You can install the libraries from Library Manager itself.
Since the was too long(8959 lines), I was not able to Post here. You can find the total project files on Github.
Uploading Source Code:
Connect ESP32 with Laptop using a USB cable. Check the Uploading configurations like “Board: ESP32 Dev Module, Uploading Speed, and select the right port”.
Then upload it. After successful uploading, you can see the video playing on the OLED Display from the movie Bahubali. Which is released in 2015, It is a massive hit, which broke all most of all records of Indian cinema. Here is the Netflix link. if you wish, You can watch it.
Below is the Screens shot of the playing video.
Video Tutorial: Playing Videos on 128X64 OLED Display with ESP32