OLED .96 Screen misc info lower rt corner problem.

Problem: In the lower right corner of the screen are misc white dots that change as you go thru different screen redraws. (3 pictures included) Each time I redraw the screen sometimes there is nothing other times there is misc white dots (Not Characters only white dots).

Product description: 0.96" I2C 128X64 OLED LCD LED Blue Color SSD1306 and a Arduino NANO

I have read dozens and dozens of blogs about O LED’s and found nothing on this subject. I have included the two parts of the program pertaining to the O Led where I first set it up and then a function where I call it thru out the program to REDRAW the entire screen. I believe? that maybe has something to do with the internal page memory of the OLED that is not being cleared and is buffered or something. Included code will be the setup of the OLED then the Function call that redraws the screen. One thing I want to point out. On a HARD reset of the Arduino NANO board the first screen has the “Chk Q 1-16” on the screen, there is always a single dot in the lower right corner but as you move thru out the screens and go back to the first screen that lower right corner misc dots changes every time. Any help would be greatly appreciated. Thanking you in advance.

OLED:

// ******* OLED system below
#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
// A4 , A5
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
// ******* End of OLED system

Function Call:

// This function clears the display and prepares to have the last line inserted.
void replaceDisplay()
{ // Read the value in Address(0) and report
display.clearDisplay(); display.clearDisplay();
valInMemory = EEPROM.read(0);
// NEW System (Over, Down) Draw the LINE FIRST or you will get garbage in the lower rt of the screen
display.drawLine(0,20,127,20, WHITE);display.display();
display.setCursor(25,0); display.print(“Unit#”);
display.setCursor(100,0); display.print(valInMemory);
} // End of replaceDisplay Function

OLED_screenError1.jpg

OLED_screenError2.jpg

OLED_screenError3.jpg

Adafruit_SSD1306 problems are generally down to excess SRAM use.

Please post the Memory use lines from the build report.

Or just attach the complete build-able sketch.

David.