Menu

FlowLogicExplanations

FlowLCD Logic Explanations

The scenarios below detail the FlowLCD.drawString() calls with their corresponding screen outputs after each keypress if any.

The assumption is for an 18 character by 8 line LCD display. If the dimensions are changed, FlowLCD will adjust accordingly.



1 Line, No Flow

This mimics the LCD.drawString(?,0,0) call:

FlowLCD.drawString("Just one line");
          1    1 1
0....5....0....5.7
0
1
2
3
4
5
6
7
Just one line








2 Lines, No Flow

This mimics two LCD.drawString() calls to (0,0) and (0,1):

FlowLCD.drawString("This is line 1\nThis is line 2");  // use \n for line breaks
          1    1 1
0....5....0....5.7
0
1
2
3
4
5
6
7
This is line 1
This is line 2







2 Lines with Flow

FlowLCD.drawString("This is line 1 This is line 2");  // no \n
          1    1 1
0....5....0....5.7
0
1
2
3
4
5
6
7
This is line 1
This is line 2







8 Lines with Flow, No Scrolling

FlowLCD.drawString("This is a very long paragraph, for some open-minded programmers, "
                 + "that will wrap around to eight lines. Cool, huh?");
          1    1 1
0....5....0....5.7
0
1
2
3
4
5
6
7
This is a very
long paragraph,
for some open-
minded
programmers, that
will wrap around
to eight lines.
Cool, huh?



10 Lines with Flow AND Scrolling

FlowLCD.drawString("First Line\nLine 2\nLine 3\nLine 4\nLine 5\nLine 6\nLine 7\nLine 8\nLine 9\nLAST LINE");
          1    1 1
0....5....0....5.7
0
1
2
3
4
5
6
7
First Line
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
       \/
« Initial screen
          1    1 1
0....5....0....5.7
0
1
2
3
4
5
6
7
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
       \/
« After first DOWN press
          1    1 1
0....5....0....5.7
0
1
2
3
4
5
6
7
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
LAST LINE
« After first DOWN press

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.