[ESP32 Project 5: OLED Display]

Pandu Puncak Prawira
22 min readMar 1, 2021

--

Hello everyone!

I know that I have previously been writing about the project using the Indonesian language, and someday I still want to write it in Indonesian. But yesterday I had an epiphany, that this is one of the ways that I could improve my English writing while still doing my college projects. And so, this time I am writing my report on project five with English. I’d like to apologize beforehand if there is any spelling mistakes or grammar errors, thank you.

Alright then, let’s get into it!

All of the projects with ESP32 before usually relies on some kind of input/output data interaction between ESP32 and its respective components, right? Well this time, we are doing something a little bit different. For this project, we are using an OLED display monitor to visualize a few things that we create from our programming in Arduino IDE. The idea is that while using a specific library for OLED displays downloaded from the internet. we could use the OLED monitor to display words, shapes, and pictures. The requirements for this project actually didn’t specify on what kind of display monitor that we want to use, but because all I have on hand is the OLED display, that is what we are going to use.

A few quick notes on the OLED, OLED stands for Organic Light-Emitting Diode, which basically means that each pixel on its screen consists of very tiny lights usually arranged in groups of RGB colours that will light up to display what colours is needed. The “organic” part of the name refers to the film between the conductors in each LED that is used to produce the light. OLED differs from LCD screens in that each pixel in OLED generates light individually, while LCD use filtered light from a backlight array.

Because it produces light individually, OLED is usually more energy-friendly, especially when displaying dark colours, while also having an advantage in accuracy of the colours displayed. However, LCD screens usually have a longer lifespan than OLEDs due to the colour degradation that happens to OLEDs over time, while also being much cheaper to manufacture. (reference from : [1])

Now to get into the circuit that we are going to use for this project, there’s actually only one circuit in use. The circuit is really-really simple, only having 3 components to create it. The components are:

  • ESP-32S Mode Development Board
  • OLED 128x64 I2C 0.96 display monitor (White,Blue,Yellow Backlight)
  • Female-to-female jumper cable

What it looks like on a schematic:

And this is how it looks like on real life:

While it is true that in using a breadboard, the circuit would look more tidy, sadly my current breadboard seems broken (see previous reports) and I haven’t had the time to buy another one. Nothing seems different from the example, and so it would do for now.

The wiring is very simple. The GND pin in the OLED is connected to GND pin on ESP32, VCC is connected to 3.3 V pin on ESP32, SCL pin is connected to the default I2C pin on ESP32 for SCL (GPIO 22), and last the SDA pin is connected to its respective default pin (GPIO 21). We use SCL and SDA with GPIO 22 and 21 because we are using I2C communication protocol.

The only thing that differs from each try of the project is honestly just the algorithm. The algorithm that we use utilizes downloaded library from Adafruit for SSD1306 and GFX. Now, we get into each run of the project:

  1. Test

The first run is using built-in algorithm from the library to test the whether the OLED monitor can display some random things. The algorithm for this one is:

/*********
Complete project details at https://randomnerdtutorials.com

This is an example for our Monochrome OLEDs based on SSD1306 drivers. Pick one up today in the adafruit shop! ------> http://www.adafruit.com/category/63_98
This example is for a 128x32 pixel display using I2C to communicate 3 pins are required to interface (two I2C and one reset).
Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries, with contributions from the open source community. BSD license, check license.txt for more information All text above, and the splash screen below must be included in any redistribution.
*********/

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

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

#define NUMFLAKES 10 // Number of snowflakes in the animation example

#define LOGO_HEIGHT 16
#define LOGO_WIDTH 16
static const unsigned char PROGMEM logo_bmp[] =
{ B00000000, B11000000,
B00000001, B11000000,
B00000001, B11000000,
B00000011, B11100000,
B11110011, B11100000,
B11111110, B11111000,
B01111110, B11111111,
B00110011, B10011111,
B00011111, B11111100,
B00001101, B01110000,
B00011011, B10100000,
B00111111, B11100000,
B00111111, B11110000,
B01111100, B11110000,
B01110000, B01110000,
B00000000, B00110000 };

void setup() {
Serial.begin(115200);

// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3D)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}

// Show initial display buffer contents on the screen --
// the library initializes this with an Adafruit splash screen.
display.display();
delay(2000); // Pause for 2 seconds

// Clear the buffer
display.clearDisplay();

// Draw a single pixel in white
display.drawPixel(10, 10, WHITE);

// Show the display buffer on the screen. You MUST call display() after
// drawing commands to make them visible on screen!
display.display();
delay(2000);
// display.display() is NOT necessary after every single drawing command,
// unless that's what you want...rather, you can batch up a bunch of
// drawing operations and then update the screen all at once by calling
// display.display(). These examples demonstrate both approaches...

testdrawline(); // Draw many lines

testdrawrect(); // Draw rectangles (outlines)

testfillrect(); // Draw rectangles (filled)

testdrawcircle(); // Draw circles (outlines)

testfillcircle(); // Draw circles (filled)

testdrawroundrect(); // Draw rounded rectangles (outlines)

testfillroundrect(); // Draw rounded rectangles (filled)

testdrawtriangle(); // Draw triangles (outlines)

testfilltriangle(); // Draw triangles (filled)

testdrawchar(); // Draw characters of the default font

testdrawstyles(); // Draw 'stylized' characters

testscrolltext(); // Draw scrolling text

testdrawbitmap(); // Draw a small bitmap image

// Invert and restore display, pausing in-between
display.invertDisplay(true);
delay(1000);
display.invertDisplay(false);
delay(1000);

testanimate(logo_bmp, LOGO_WIDTH, LOGO_HEIGHT); // Animate bitmaps
}

void loop() {
}

void testdrawline() {
int16_t i;

display.clearDisplay(); // Clear display buffer

for(i=0; i<display.width(); i+=4) {
display.drawLine(0, 0, i, display.height()-1, WHITE);
display.display(); // Update screen with each newly-drawn line
delay(1);
}
for(i=0; i<display.height(); i+=4) {
display.drawLine(0, 0, display.width()-1, i, WHITE);
display.display();
delay(1);
}
delay(250);

display.clearDisplay();

for(i=0; i<display.width(); i+=4) {
display.drawLine(0, display.height()-1, i, 0, WHITE);
display.display();
delay(1);
}
for(i=display.height()-1; i>=0; i-=4) {
display.drawLine(0, display.height()-1, display.width()-1, i, WHITE);
display.display();
delay(1);
}
delay(250);

display.clearDisplay();

for(i=display.width()-1; i>=0; i-=4) {
display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE);
display.display();
delay(1);
}
for(i=display.height()-1; i>=0; i-=4) {
display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE);
display.display();
delay(1);
}
delay(250);

display.clearDisplay();

for(i=0; i<display.height(); i+=4) {
display.drawLine(display.width()-1, 0, 0, i, WHITE);
display.display();
delay(1);
}
for(i=0; i<display.width(); i+=4) {
display.drawLine(display.width()-1, 0, i, display.height()-1, WHITE);
display.display();
delay(1);
}

delay(2000); // Pause for 2 seconds
}

void testdrawrect(void) {
display.clearDisplay();

for(int16_t i=0; i<display.height()/2; i+=2) {
display.drawRect(i, i, display.width()-2*i, display.height()-2*i, WHITE);
display.display(); // Update screen with each newly-drawn rectangle
delay(1);
}

delay(2000);
}

void testfillrect(void) {
display.clearDisplay();

for(int16_t i=0; i<display.height()/2; i+=3) {
// The INVERSE color is used so rectangles alternate white/black
display.fillRect(i, i, display.width()-i*2, display.height()-i*2, INVERSE);
display.display(); // Update screen with each newly-drawn rectangle
delay(1);
}

delay(2000);
}

void testdrawcircle(void) {
display.clearDisplay();

for(int16_t i=0; i<max(display.width(),display.height())/2; i+=2) {
display.drawCircle(display.width()/2, display.height()/2, i, WHITE);
display.display();
delay(1);
}

delay(2000);
}

void testfillcircle(void) {
display.clearDisplay();

for(int16_t i=max(display.width(),display.height())/2; i>0; i-=3) {
// The INVERSE color is used so circles alternate white/black
display.fillCircle(display.width() / 2, display.height() / 2, i, INVERSE);
display.display(); // Update screen with each newly-drawn circle
delay(1);
}

delay(2000);
}

void testdrawroundrect(void) {
display.clearDisplay();

for(int16_t i=0; i<display.height()/2-2; i+=2) {
display.drawRoundRect(i, i, display.width()-2*i, display.height()-2*i,
display.height()/4, WHITE);
display.display();
delay(1);
}

delay(2000);
}

void testfillroundrect(void) {
display.clearDisplay();

for(int16_t i=0; i<display.height()/2-2; i+=2) {
// The INVERSE color is used so round-rects alternate white/black
display.fillRoundRect(i, i, display.width()-2*i, display.height()-2*i,
display.height()/4, INVERSE);
display.display();
delay(1);
}

delay(2000);
}

void testdrawtriangle(void) {
display.clearDisplay();

for(int16_t i=0; i<max(display.width(),display.height())/2; i+=5) {
display.drawTriangle(
display.width()/2 , display.height()/2-i,
display.width()/2-i, display.height()/2+i,
display.width()/2+i, display.height()/2+i, WHITE);
display.display();
delay(1);
}

delay(2000);
}

void testfilltriangle(void) {
display.clearDisplay();

for(int16_t i=max(display.width(),display.height())/2; i>0; i-=5) {
// The INVERSE color is used so triangles alternate white/black
display.fillTriangle(
display.width()/2 , display.height()/2-i,
display.width()/2-i, display.height()/2+i,
display.width()/2+i, display.height()/2+i, INVERSE);
display.display();
delay(1);
}

delay(2000);
}

void testdrawchar(void) {
display.clearDisplay();

display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(WHITE); // Draw white text
display.setCursor(0, 0); // Start at top-left corner
display.cp437(true); // Use full 256 char 'Code Page 437' font

// Not all the characters will fit on the display. This is normal.
// Library will draw what it can and the rest will be clipped.
for(int16_t i=0; i<256; i++) {
if(i == '\n') display.write(' ');
else display.write(i);
}

display.display();
delay(2000);
}

void testdrawstyles(void) {
display.clearDisplay();

display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(WHITE); // Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("Hello, world!"));

display.setTextColor(BLACK, WHITE); // Draw 'inverse' text
display.println(3.141592);

display.setTextSize(2); // Draw 2X-scale text
display.setTextColor(WHITE);
display.print(F("0x")); display.println(0xDEADBEEF, HEX);

display.display();
delay(2000);
}

void testscrolltext(void) {
display.clearDisplay();

display.setTextSize(2); // Draw 2X-scale text
display.setTextColor(WHITE);
display.setCursor(10, 0);
display.println(F("scroll"));
display.display(); // Show initial text
delay(100);

// Scroll in various directions, pausing in-between:
display.startscrollright(0x00, 0x0F);
delay(2000);
display.stopscroll();
delay(1000);
display.startscrollleft(0x00, 0x0F);
delay(2000);
display.stopscroll();
delay(1000);
display.startscrolldiagright(0x00, 0x07);
delay(2000);
display.startscrolldiagleft(0x00, 0x07);
delay(2000);
display.stopscroll();
delay(1000);
}

void testdrawbitmap(void) {
display.clearDisplay();

display.drawBitmap(
(display.width() - LOGO_WIDTH ) / 2,
(display.height() - LOGO_HEIGHT) / 2,
logo_bmp, LOGO_WIDTH, LOGO_HEIGHT, 1);
display.display();
delay(1000);
}

#define XPOS 0 // Indexes into the 'icons' array in function below
#define YPOS 1
#define DELTAY 2

void testanimate(const uint8_t *bitmap, uint8_t w, uint8_t h) {
int8_t f, icons[NUMFLAKES][3];

// Initialize 'snowflake' positions
for(f=0; f< NUMFLAKES; f++) {
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
Serial.print(F("x: "));
Serial.print(icons[f][XPOS], DEC);
Serial.print(F(" y: "));
Serial.print(icons[f][YPOS], DEC);
Serial.print(F(" dy: "));
Serial.println(icons[f][DELTAY], DEC);
}

for(;;) { // Loop forever...
display.clearDisplay(); // Clear the display buffer

// Draw each snowflake:
for(f=0; f< NUMFLAKES; f++) {
display.drawBitmap(icons[f][XPOS], icons[f][YPOS], bitmap, w, h, WHITE);
}

display.display(); // Show the display buffer on the screen
delay(200); // Pause for 1/10 second

// Then update coordinates of each flake...
for(f=0; f< NUMFLAKES; f++) {
icons[f][YPOS] += icons[f][DELTAY];
// If snowflake is off the bottom of the screen...
if (icons[f][YPOS] >= display.height()) {
// Reinitialize to a random position, just off the top
icons[f][XPOS] = random(1 - LOGO_WIDTH, display.width());
icons[f][YPOS] = -LOGO_HEIGHT;
icons[f][DELTAY] = random(1, 6);
}
}
}
}

Honestly the code is pretty long, but it does the job well. We will get into explaining some parts of the algorithm to use, but for now we are just testing whether the OLED could work with our ESP32. And the result could be seen on this video:

There’s a problem at first when trying out the algorithm, the OLED display is not showing anything. After following the steps from the tutorial that were given (checking if it is properly wired, and checking the address), the error on the algorithm could be determined. After changing into the following line:

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)

The code was run successfully. It failed before with (0x3D) because our address for OLED is 0x3C.

2. Hello,world!

Next we are using the OLED Display to write a text. The text is “Hello, world!” and it is supposed to be shown on the upper left side of the screen. The algorithm for this function is:

/*********
Rui Santos
Complete project details at https://randomnerdtutorials.com
*********/

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

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
Serial.begin(115200);

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
delay(2000);
display.clearDisplay();

display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 10);
// Display static text
display.println("Hello, world!");
display.display();
}

void loop() {

}

The group of code with ‘#include <filename.h> is to import the libraries that was download beforehand. The line of code below is used to define how wide and long do we want our display to be. We use 128 width and 64 height (in pixels) because we want to use our OLED monitor at full screen.

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

And then the line of code below is used to initialize a display object using I2C communication protocol (&Wire). (-1) in the parameter means that the OLED doesn’t have a RESET pin, but if we were to use an OLED with that pin we would pass the GPIO number as the parameter.

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { 
Serial.println("SSD1306 allocation failed");
for(;;); // Don't proceed, loop forever
}

After that we are using built in functions/methods with the display.

display.clearDisplay(); //for clearing di display bdisplay.setTextSize(1); //setting text size
display.setTextColor(WHITE); //set text colour
display.setCursor(0,10);// set where we want to display the text (0,10) for upper left display.println("Hello, world!"); //sending the text to the displaydisplay.display();//displaying the text on the screen

The algorithm was ran successfully and this picture below is how it looks:

3. Changing Font

While before we were satisfied with just showing the text, this time we want the text to use a specific font on display. And so, we just need to tweak a little on the algorithm before like:

/*********
Rui Santos
Complete project details at https://randomnerdtutorials.com
*********/

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeSerifItalic9pt7b.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
Serial.begin(115200);

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println("SSD1306 allocation failed");
for(;;);
}
delay(2000);

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

}

As could be seen, we added this following lines of code:

#include <Fonts/FreeSerifItalic9pt7b.h> // to include the font library that wedisplay.setFont(&FreeSerifItalic9pt7b); //to set the text shown to our specific library

The program was ran successfully and now it displays the “Hello, world!” message in FreeSerifItalic font. It must be noted that it shows a far larger text size than before, and that is because the size of the font is fixed depending on what type we use. The one used for this is the 9 point size.

This is how it looks like:

4. Changing Shapes

Now we are going to use the OLEd to display several shapes. The shapes that will be shown are :

  • Pixel
  • Line
  • Rectangle
  • Round Rectangle
  • Circle
  • Triangle
  • Inverted colours Triangle

The code that will be used for this function is:

void setup() {
Serial.begin(115200);

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
delay(2000); // Pause for 2 seconds

// Clear the buffer
display.clearDisplay();

// Draw a single pixel in white
display.drawPixel(64, 32, WHITE);
display.display();
delay(3000);

// Draw line
display.clearDisplay();
display.drawLine(0, 0, 127, 20, WHITE);
display.display();
delay(3000);

// Draw rectangle
display.clearDisplay();
display.drawRect(30, 10, 50, 30, WHITE);
display.display();
delay(3000);
// Fill rectangle
display.fillRect(30, 10, 50, 30, WHITE);
display.display();
delay(3000);

// Draw round rectangle
display.clearDisplay();
display.drawRoundRect(10, 10, 30, 50, 2, WHITE);
display.display();
delay(3000);
// Fill round rectangle
display.clearDisplay();
display.fillRoundRect(10, 10, 30, 50, 2, WHITE);
display.display();
delay(3000);

// Draw circle
display.clearDisplay();
display.drawCircle(64, 32, 10, WHITE);
display.display();
delay(3000);
// Fill circle
display.fillCircle(64, 32, 10, WHITE);
display.display();
delay(3000);

// Draw triangle
display.clearDisplay();
display.drawTriangle(10, 10, 55, 20, 5, 40, WHITE);
display.display();
delay(3000);
// Fill triangle
display.fillTriangle(10, 10, 55, 20, 5, 40, WHITE);
display.display();
delay(3000);

// Invert and restore display, pausing in-between
display.invertDisplay(true);
delay(3000);
display.invertDisplay(false);
delay(3000);
}

void loop() {

}

As can be seen above, the shapes shown use a function with integers as the parameters. Each function differs in how it uses integers, and the explanation is:

  • Pixel
display.drawPixel(64, 32, WHITE);// displays a pixel at 64 coordinate x and 32 coordinate y, with white colour
  • Line
display.drawLine(0, 0, 127, 20, WHITE); //draws a line from point(0,0) to point (127,20) in white colour)
  • Rectangle
display.drawRect(10, 10, 50, 30, WHITE); //draws a rectangle, with (10,10) as the (x,y) coordinate on the top left corner of the rectangle, with width of 50 pixels and height of 30 pixels, shown in white colourdisplay.fillRect(30, 10, 50, 30, WHITE);//this line of code is used to fill the rectangle with colour
  • Round Rectangle
display.drawRoundRect(10, 10, 30, 50, 2, WHITE); //this function accepts the same parameters as the one before it, with an added integer 2 as the radius of the corner
display.fillRoundRect(10, 10, 30, 50, 2, WHITE);//this line of code is used to fill the round rectangle with colour
  • Circle
display.drawCircle(64, 32, 10, WHITE);//this line of code is used to display a circle with its center on (64,32) as the x,y coordinate and a radius of 10 pixels, shown in white colour. 
display.fillCircle(64, 32, 10, WHITE);//this line of code is used to fill the circle with the colour
  • Triangle
display.drawTriangle(10, 10, 55, 20, 5, 40, WHITE);//this line of code is used to draw a line between 3 points, which are (10,10), (55,20), and (5,40). This would create a triangle, shown in white colour. 
display.fillTriangle(10, 10, 55, 20, 5, 40, WHITE); //This line of code is used to fill the triangle with white colour.
  • Inverted colours Triangle
display.fillTriangle(10, 10, 55, 20, 5, 40, WHITE);// this line of code is used to display a triangle with black colours, while the rest of the screen is shown in white. 

This is how it looks like:

Example: Rounded Rectangle
Example: FIlled Rounded Rectangle

5. Bitmap

For the next part, we are going to do something a little bit more exciting. We are going to try to display an image on the screen with monochrome colours. But first there are steps that we needed to do to convert the images into monochrome colours.

Original Image (128x64 sized)

The above picture is our original image, which we are going to save as a monochrome colour using paint.

Monochrome Image

This picture above shows the original image in a monochrome colour. After that, we need to convert the image into an array so that it could be shown on the OLED Display. We use the app LCD Image Converter to convert the image into monochrome colours. This, is the array created:

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x07, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xff, 0xff, 0xff, 0xf3, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x36, 0x00, 0x14, 0xff, 0xff, 0xff, 0xe3, 0x8f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x56, 0x00, 0x1f, 0xff, 0xff, 0xfe, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xef,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xcf,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xcf,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xbf, 0xbf, 0xff, 0xff, 0xdd, 0xef,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xbf, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x5e, 0x1f, 0xff, 0xff, 0xef, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01, 0x10, 0x40, 0x1f, 0x0f, 0xff, 0xff, 0x83, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0x04, 0xc0, 0x87, 0xe7, 0xff, 0xff, 0x5f, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x82, 0x2f, 0x07, 0xff, 0x9f, 0xfc, 0xd9, 0xef,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x87, 0xe6, 0x0e, 0x02, 0x3f, 0xff, 0xf0, 0x81, 0xe3,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x33, 0xc0, 0x1a, 0x0f, 0x03, 0xe0, 0x0d, 0xd7,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x57, 0xc0, 0x3f, 0x87,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc8, 0x00, 0x98, 0x00, 0x1f, 0x08, 0xbc, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x58, 0x00, 0xfa, 0x00, 0x7d, 0xee, 0x7d, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0x78, 0x00, 0x03, 0x8e, 0x7c, 0xfd,
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0x0c, 0x8e, 0x7c, 0x3c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x40, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x70, 0x13, 0x1c, 0xdf,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x20, 0x00, 0x00, 0x00, 0xfc, 0x64, 0x80, 0x23, 0xf8, 0xdf,
0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x01, 0xfc, 0x30, 0x00, 0x03, 0xfc, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x90, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x01, 0xf0, 0x1e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xc8, 0x00, 0x00, 0x00, 0x07, 0x00, 0x10, 0x00, 0x66, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8e, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x14, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0xf2, 0x07,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0xe4, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x43, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x01, 0x80, 0x00, 0x80, 0x00, 0x00, 0x0e, 0x43,
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x21, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x4f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8f, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x7f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x80, 0x00, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x10, 0x00, 0xe4, 0x8f, 0xf0, 0x01, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x7c, 0x00, 0x00, 0x10, 0x01, 0xf5, 0xb8, 0xf8, 0x03, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x07, 0xd0, 0x03, 0xfe, 0xc2, 0xf0, 0x03, 0xdc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x80, 0x37, 0xf0, 0x07, 0xfe, 0x61, 0xe0, 0x00, 0x3c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x9f, 0xfd, 0x07, 0xfc, 0x07, 0x80, 0x00, 0xd8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xc1, 0xff, 0xfe, 0x07, 0xf8, 0xfe, 0x01, 0x00, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x8c, 0xff, 0xff, 0x1f, 0xf7, 0xf0, 0x06, 0x00, 0xfc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xf0, 0x19, 0x83, 0xbc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x1f, 0xff, 0xf8, 0x01, 0x86, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xfe, 0x3f, 0xff, 0xf1, 0x03, 0x18, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0x0f, 0x30, 0x70,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfe, 0x40, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x81, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x3f, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xfe, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xbf, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xfc, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xfa, 0x08, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xe4, 0x12, 0x00

The image was then displayed on the screen with this code:

/*********
Rui Santos
Complete project details at https://randomnerdtutorials.com
*********/

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

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

static const uint8_t image_data_Saraarray[1024] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x07, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xff, 0xff, 0xff, 0xf3, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x36, 0x00, 0x14, 0xff, 0xff, 0xff, 0xe3, 0x8f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x56, 0x00, 0x1f, 0xff, 0xff, 0xfe, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xef,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xcf,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xcf,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xbf, 0xbf, 0xff, 0xff, 0xdd, 0xef,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xbf, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x02, 0x00, 0x00, 0x5e, 0x1f, 0xff, 0xff, 0xef, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x01, 0x10, 0x40, 0x1f, 0x0f, 0xff, 0xff, 0x83, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0x04, 0xc0, 0x87, 0xe7, 0xff, 0xff, 0x5f, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x82, 0x2f, 0x07, 0xff, 0x9f, 0xfc, 0xd9, 0xef,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x87, 0xe6, 0x0e, 0x02, 0x3f, 0xff, 0xf0, 0x81, 0xe3,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x33, 0xc0, 0x1a, 0x0f, 0x03, 0xe0, 0x0d, 0xd7,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x38, 0x00, 0x57, 0xc0, 0x3f, 0x87,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc8, 0x00, 0x98, 0x00, 0x1f, 0x08, 0xbc, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x58, 0x00, 0xfa, 0x00, 0x7d, 0xee, 0x7d, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x00, 0x78, 0x00, 0x03, 0x8e, 0x7c, 0xfd,
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x3c, 0x00, 0x7c, 0x00, 0x0c, 0x8e, 0x7c, 0x3c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x40, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x70, 0x13, 0x1c, 0xdf,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x20, 0x00, 0x00, 0x00, 0xfc, 0x64, 0x80, 0x23, 0xf8, 0xdf,
0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x01, 0xfc, 0x30, 0x00, 0x03, 0xfc, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x90, 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x01, 0xf0, 0x1e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xc8, 0x00, 0x00, 0x00, 0x07, 0x00, 0x10, 0x00, 0x66, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8e, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x14, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0xf2, 0x07,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0xe4, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x43, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x01, 0x80, 0x00, 0x80, 0x00, 0x00, 0x0e, 0x43,
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x21, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x4f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x8f, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x7f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x80, 0x00, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x10, 0x00, 0xe4, 0x8f, 0xf0, 0x01, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x7c, 0x00, 0x00, 0x10, 0x01, 0xf5, 0xb8, 0xf8, 0x03, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x07, 0xd0, 0x03, 0xfe, 0xc2, 0xf0, 0x03, 0xdc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5d, 0x80, 0x37, 0xf0, 0x07, 0xfe, 0x61, 0xe0, 0x00, 0x3c,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x9f, 0xfd, 0x07, 0xfc, 0x07, 0x80, 0x00, 0xd8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0xc1, 0xff, 0xfe, 0x07, 0xf8, 0xfe, 0x01, 0x00, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x8c, 0xff, 0xff, 0x1f, 0xf7, 0xf0, 0x06, 0x00, 0xfc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0x1f, 0xff, 0xf0, 0x19, 0x83, 0xbc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x1f, 0xff, 0xf8, 0x01, 0x86, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xfe, 0x3f, 0xff, 0xf1, 0x03, 0x18, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0x0f, 0x30, 0x70,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xfe, 0x40, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7f, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x81, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x3f, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xfe, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xbf, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xfc, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xfa, 0x08, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xe4, 0x12, 0x00
};

void setup() {
Serial.begin(115200);

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F(“SSD1306 allocation failed”));
for(;;);
}
delay(2000); // Pause for 2 seconds

// Clear the buffer.
display.clearDisplay();

// Draw bitmap on the screen
display.drawBitmap(0, 0, image_data_Saraarray, 128, 64, 1);
display.display();
}

void loop() {

}

The code was run successfully, and this is how it looks like on OLED Display:

Analysis

Honestly the only thing that is weird on this project is that it shows all of the images in blue and yellow colours. My personal theory about why that is, is that because the OLED monitor that I was using has a Yellow and Blue Backlight on the details. The colours shown is true that it is white, but because of the backlight it seems to pass sort of a filter and comes out on the display as blue or yellow colours. Other than that, this project is almost free of any problems, which is rather suspicious because most of the projects that I tried before results in nothing or something different than what I wanted. It really do seem that the only component not working before was the Breadboard, and because it was used to connect to pretty much everything, we keep failing.

And so, with that analysis in mind, concludes my report on this project. Video documentation on this one could be seen on the link below:

Video OLED

Almost all of the report and project I wrote above is referenced from this website:

https://randomnerdtutorials.com/esp32-ssd1306-oled-display-arduino-ide/

Thank you for your attention, and have a good day. :D

--

--

No responses yet