I’m using the terminal widget to send some text on a LCD display (20 x 4) according this code:
BLYNK_WRITE(V7) // terminal widget on VP7
{
String text = param.asStr();
lcd.print(text);
terminal.flush();
}
But on the LCD side I can see the text on row 1, then row 3, then row 2 and then row 4.
Is possible to fill the text sequentially on row 1,2,3,4?
Thank you
If so, then I can’t see the string splitting in your posted fragment. Have you tried sending long string (ie 80 chars long) to LCD without Blynk libraries? I’ve seen this behaviour in 4x40 LCD module, but never in 4x20, which is supposed to be single controller only.
Yes, on those physical LCDs, streaming text is normally split between alternating lines… something to do with the design of the memory or controller chip. The only solution is to specifically specify character/string placement… lots of logic code to take a string, split it up to the required line length and specifically place it on incrementing lines, rinse, loop, repeat
That is true @Gunner, but it’s the library’s job to do it, and those I’ve been working with did it correctly on 4x20 (even text scrolling was working), but it all failed on 4x40, even though it was supposed to work. Just a note
@Gunner@marvin7 …ok guys after a long night… i got it!!
This is the code to visualize all the 80 characters in right position. I used “text.substring” to extract the text inside a string sent via Terminal, put it in an array row by row and then write them on LCD according to right position.
What do you think? Have I waste my night or is a good solution?