HOW TO GET RID OF WHITE LINES IN THE EDGE OF 1.3 INCH OLED

//Kotobuki
//Temperature
#include <DallasTemperature.h>
#include <DHT.h>
#define DHTPIN 12
DHT dht(DHTPIN, DHT11);
#include "U8glib.h"
U8GLIB_SSD1306_128X64_2X u8g(U8G_I2C_OPT_NONE); 
#define BUS 2
OneWire oneWire(BUS);
DallasTemperature s1(&oneWire); // KY001
DallasTemperature s2(&oneWire);

const int currentSensor = A0;
const int voltageSensor = A1;
float vOUT = 0.0;
float vIN = 0.0;
float R1 = 10000.0;
float R2 = 1980.0;
float Vdata = 0;
float V,I,I1;
float Cdata;
float value;

float juiceleft = 0.0;
float timeleft = 0.0;

void kotobuki_zed(void)
{
float t = dht.readTemperature(); //DHT11 (Temperature)
float h = dht.readHumidity();  // DHT11 (Humidity)
 

u8g.setFont(u8g_font_fixed_v0);//Font 7 pixel
//u8g.setFont(u8g_font_lucasfont_alternate);//Font 7 pixel
//u8g.setFont(u8g_font_profont10);// Font 6 pixel

u8g.setPrintPos(2, 7);
u8g.print("BATTRY TEMP:");
u8g.setPrintPos(73, 7);
u8g.print(s1.getTempCByIndex(0)); // (18B20 Prob & KY001)
u8g.setPrintPos(115, 7);
u8g.print("C");

u8g.setPrintPos(2, 16);
u8g.print("LM2596 TEMP:");
u8g.setPrintPos(73, 16);
u8g.print(s1.getTempCByIndex(1));
u8g.setPrintPos(115, 16);
u8g.print("C");

u8g.setPrintPos(2, 25);
u8g.print("FAN'S  TEMP:");
u8g.setPrintPos(73, 25);
u8g.print(t);
u8g.setPrintPos(114, 25);
u8g.print("C");

u8g.setPrintPos(2, 34);
u8g.print("FAN'S HUMID:");
u8g.setPrintPos(73, 34);
u8g.print(h);
u8g.setPrintPos(114, 34);
u8g.print("%");
{


for(int i = 0; i < 300; i++)
{
Cdata = Cdata + analogRead(currentSensor);
Vdata = Vdata + analogRead(voltageSensor);
delay(1);
}

float Cdata=0;
float V=0;
float Vdata=0;
float vIN = 0.0;
float value = 0;
Cdata=Cdata/300;           
V=(Cdata/1024.0)*5000;                       
I=((V - 2500)/ 96);
Vdata=Vdata/300;
vOUT = (Vdata * 5.0) / 1024.0;
vIN = (vOUT / (R2/(R1+R2)));
float juiceleft = 0.0;
float timeleft = 0.0;
juiceleft=(55.44/value);
timeleft=(juiceleft - (juiceleft)*0.05);


u8g.setPrintPos(2, 43);
u8g.print("Volt:");
u8g.setPrintPos(38, 43);
u8g.print(vIN,1);
u8g.setPrintPos(57, 43);
u8g.print("v");
u8g.setPrintPos(63, 43);
u8g.print("|");

float I=0;
u8g.setPrintPos(70, 43);
u8g.print("Amps:");
u8g.setPrintPos(100, 43);
u8g.print(I,1);
u8g.setPrintPos(120, 43);
u8g.print("A");


u8g.setPrintPos(2, 51);
u8g.print("Powr:");
u8g.setPrintPos(38, 51);
u8g.print(value,1);
u8g.setPrintPos(57, 51);
u8g.print("W");
u8g.setPrintPos(63, 51);
u8g.print("|");
value=(I * vIN);

u8g.setPrintPos(2, 60);
u8g.print("BATCAP:");
u8g.setPrintPos(43, 60);
u8g.print("4.4");
u8g.setPrintPos(63, 60);
u8g.print("Ah");
u8g.setPrintPos(75, 60);
u8g.print("|");
u8g.setPrintPos(83, 60);
u8g.print("55.44");
u8g.setPrintPos(115, 60);
u8g.print("Wh");

u8g.setPrintPos(70, 51);
u8g.print("TLft:");
u8g.setPrintPos(100, 51);
u8g.print(timeleft,1);
u8g.setPrintPos(120, 51);
u8g.print("h");

}
}

void setup(void)
{
Serial.begin(9600);
s1.begin(); // sensor 1
s2.begin(); // sensor 2
dht.begin();
}

void loop(void)
{
s1.requestTemperatures();
s2.requestTemperatures();
u8g.firstPage(); 
do
{   
kotobuki_zed();
}
while( u8g.nextPage()); 
delay(500);
}

HELLO GUYS GOOD DAY, IM CURRENTLY WORKING ON THIS CODE WHERE I CAN MONITOR VOLTAGE CURRENT POWER AND TEMPERATURES AND IM USING A 4 PIN 1.3 INCH OLED DISPLAY AS MY SCREEN. THE ISSUE IS THERE IS A WHITE LINE IN THE RIGHT EDGE OF MY SCREEN AND I TRIED MY BEST TO GET RID OF IT BUT NO LUCK :confused: CAN SOMEONE PLEASE HELP ME GET RID OF THIS WHITE LINE :confused: :confused: :confused:

THIS IS MY CODE:

The white line possibly means you wrote it something to the display that you shouldn’t have.

The good news is that you have the code and the hardware, so it shouldn’t be hard to find, by successively removing and replacing sections of the display code.

Please remember to use code tags when posting code.

And please don’t SHOUT AT US.

TheMemberFormerlyKnownAsAWOL:
The white line possibly means you wrote it something to the display that you shouldn't have.

The good news is that you have the code and the hardware, so it shouldn't be hard to find, by successively removing and replacing sections of the display code.

Please remember to use code tags when posting code.

And please don't SHOUT AT US.

im sorry did i said saomething to my post? if i did im very sorry im just new in arduino and on this forum sorry sir

TheMemberFormerlyKnownAsAWOL:
The white line possibly means you wrote it something to the display that you shouldn’t have.

The good news is that you have the code and the hardware, so it shouldn’t be hard to find, by successively removing and replacing sections of the display code.

Please remember to use code tags when posting code.

And please don’t SHOUT AT US.

can i ask where is that wrong code i put in my code?

Most 1.3 inch 128x64 OLED have got SH1107 and not SSD1306.
It is always wise to post a link to the actual item that you bought e.g. Ebay Sale page.

Change the constructor and I bet your program will work.
Untested.

Please edit your Original Post to put the "code" into a Code Window.

David.

david_prentice:
Most 1.3 inch 128x64 OLED have got SH1107 and not SSD1306.
It is always wise to post a link to the actual item that you bought e.g. Ebay Sale page.

Change the constructor and I bet your program will work.
Untested.

Please edit your Original Post to put the "code" into a Code Window.

David.

Okay sir Thank you very much i will edit my post thnak you again sir