how can i only clear the botom line of a LCD?
in my head the logical code would be:
lcd.setCursor(6, 1);
lcd.print(seconds);
lcd.clear(6, 1);
how can i only clear the botom line of a LCD?
in my head the logical code would be:
lcd.setCursor(6, 1);
lcd.print(seconds);
lcd.clear(6, 1);
Position the cursor to the first column of the bottom line then print as many spaces as there are columns
Even if your made up syntax worked then how long would the value of seconds be displayed ?
this is my entire code
#include <LiquidCrystal.h>
int myDelayTime = 500;
//henter inn liquidcrystal library
int seconds = 0;//setter sekund telleren til 0 sekunder ved start
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);//hvilke pins som blir brukt
byte ball[8] = {
B00000,
B00100,
B01110,
B11111,
B11111,
B01110,
B00100,
B00000,
}
;
void setup(){
lcd.begin(16, 2); //velger antall rader og rekker som skal brukes.
lcd.print("break my screen!");// sender en tekst som kommer opp på displayet
lcd.createChar(7, ball);
}
void loop()
{
// (note: linje 1 er 2. raden på displayet altså øverste er 0 g nederste er 1
lcd.setCursor(6, 1); // velger at sekundene skal telles i rute 6 i linjen under
lcd.print(seconds); // viser sekunder som har gått på displayet
delay(myDelayTime);; // venter 1 sekund
seconds += 1;//sekundene blir + 1
for( int i=0; i<=15; i++){
lcd.setCursor(i, 0);
lcd.write(7);
lcd.clear();//this is the clear i want to only target the upper lcd line
delay(myDelayTime);
myDelayTime -= 0.5;
}
}
Please try the solution that I suggested
thanks! it worked
I am glad it worked
Please post your working code for future reference and flag the topic as solved
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.