lcd refresh and pot readings

I am working on a project using 3 pots and an i2c lcd module, The first line is just text, the second will read out 3 values of the pots which will later read out values of RGB LEDs. I got the readings coming in to the arduino, and the information displaying to the lcd, the first line is perfect, the problem i have is in the second line, i am displaying the 3 values spread a crossed the second line. right now they are reading between 1023 and 0, if i run the lcd.clear() the cleans blanks out, if i use lcd.write(" ") to clear the second line the numbers flash so fast they almost fade away and its hard to read. Im wondering if there is a way to clear the screen and write the values to the screen in a solid display ?

if i only write 3 spaces to clear the line the 3 value will clear and write perfect, the other 2 will clear and write but the number comes up with odd numbers depending on how fast i turn the pot

#include <Wire.h>
 #include <LiquidCrystal_I2C.h>
 LiquidCrystal_I2C lcd(0x27,16,2);
 //set the LCD address to 0x27 for a 16 chars  and 2 line display
 int potPinb = 0;
 int potPing = 1;
 int potPinr = 2;
 
void setup()
{
    lcd.init();
    lcd.backlight();
    lcd.setCursor(0, 0);
    lcd.print("Webbspinner Inc.");

}
void loop()
{
int potValb = analogRead(potPinb);    
int potValg = analogRead(potPing);
int potValr = analogRead(potPinr);

//lcd.clear();      
String value = potValb + "   ";  
String value1 = potValg + "   ";  
String value2 = potValr + "   ";  

lcd.setCursor ( 0, 1 );         
lcd.print(potValb);  
lcd.setCursor ( 5, 1 );        
lcd.print(potValg);
lcd.setCursor ( 10, 1 );        
lcd.print(potValr);
lcd.setCursor ( 0, 1 );
lcd.print("                ");     <---- this line seems to be the problem
}

You need a little bit of time between writing the LCD and clearing it again. If you don't need the program to do anything else other than run the LCD you could put a short delay call in there. If you want to also be able to control your LEDs and stuff then you'll need to study the blink without delay sketch and learn how to tell your code to clear and write the screen only every 50 or 100 ms.

eventually this will take the 3 values and transmit them over a 433 mhz radio, while showing the set values on the lcd.

I tried adding a delay(500); and also tried a delay(1000); for some reason I couldnt figure out why the second line showed up just blank, no data was displayed.

Added a delay where? Show that code...

I took a second look at the code, and like you said i needed a delay, i was trying to add it at the wrong time, I put in a 300 ms delay before the blank line to write to the lcd and the numbers showed up perfect and stable, so now i can move on to the next part of the program, processing the values down to 255 and transmitting them over virtual wire to the 433 mhz radio

thank you for the help

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
//set the LCD address to 0x27 for a 16 chars and 2 line display
int potPinb = 0;
int potPing = 1;
int potPinr = 2;

void setup()
{
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print(“Webbspinner Inc.”);

}
void loop()
{
int potValb = analogRead(potPinb); // read the value from the sensor
int potValg = analogRead(potPing);
int potValr = analogRead(potPinr);

//lcd.clear();
String value = potValb + " ";
String value1 = potValg + " ";
String value2 = potValr + " ";

lcd.setCursor ( 0, 1 ); // go to the next line
lcd.print(potValb);
lcd.setCursor ( 5, 1 ); // go to the next line
lcd.print(potValg);
lcd.setCursor ( 10, 1 ); // go to the next line
lcd.print(potValr);
lcd.setCursor ( 0, 1 );
delay(300);
lcd.print(" ");
}