arduino lcd display 4x20

hello. Does anybody know how to make a lcd display look like this


:* * * * * * * * * :
: * * * * * * * * :
:
* * * * * * * * :
: * * * * * * * * *:

i tryet to do something like this:

void left() {
for (int a = 0; a < 2; a++) {
lcd.setCursor(0,a);
lcd.print("* ");
delay(200);
}
}

but that doesen’t work as expected
does somebody know how to do that? thanks :slight_smile:

Hi frederik30, welcome.

"That doesn't work as expected", what does that mean ? You should have a look at what you expected, and at what you got instead.

Then you should read the code you created, and have a real good look to find whether you can explain why the code does what is does, instead of what you expected it to do. I'm sure the code does exactly what you have told it to do, so your expectations must be wrong..

By the way, you forgot to put the code in the code tags. Take some time to read the forum manual (clcik !) and find out how to do that.

These lines

:*  *  *  *  *  *  *  *  *  :
:  *  *  *  *  *  *  *  *  *:
:*  *  *  *  *  *  *  *  *  :
:  *  *  *  *  *  *  *  *  *:

are 29 characters. (there are two spaces between each astrix) Even if you toss out the colon characters it is 27 characters. So even if you fix your loop code, You can't fit that on a 20 character line.

We don't know what you are doing as you haven't posted all your code. If you are trying to output characters and expecting the characters wrap to the next line, the LCD doesn't support that due to the way internal memory is laid out. However if want line wrapping to work as expected, you can use my hd44780 library and enable line wrapping and then the library will handle the line wrapping for you.

--- bill