Go Down

Topic: Changing one character at Cursor wipes rest of the line (Read 28 times) previous topic - next topic


I am trying to develop a tool using the 2 line LCD display with 5 buttons.

I have defined a character with lcd.createChar, which I use as a switch indicator and have written a few procedures to toggle the state of a variable with the buttons.
The switch indicators are placed in fixed positions on the first row of the display using a standard lcd.write. Part of my code that deals with the button is like this:

void SwitchDl(){
  if (Dl == 0) {
     Dl = 1;
     WriteBotLine("DLY ON ");
     Dl = 0;
     WriteBotLine("DLY OFF");


I have a few consecutive switch indicators that I want to display, but the thing is that when i display a character on a specific position on one line, it wipes the entire rest of the line.
How can I make these chars 'stick' to their positions when I change one?


Part of my code ... is like this:
It is the rest of the code that is probably causing the problem.


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131