|
Hello, I am relatively new to embedded so patience would be appreciated. Hardware: My goal is copying how a command line works: new text is added at the bottom of the screen and older text rolls off the top of the screen. Does anyone with experience with this graphic library have any pointers or examples? |
Replies: 2 comments 1 reply
|
It's really quite easy: Assume a display (determined by font size and ideally mono-spaced, as proportional fonts will vary the amount of text on each line. Example: 40-lines of 80-characters.
char *myStrings[] = {"String 1","String 2", ... "String 40"}; ideally all blank with "" Create the array with 40 strings to initialise it.
Void Scroll(String Line){ It will be slow, but that's just one way to achieve your requirement. Epaper is not really suitable for scrolling text. |
|
I got it working. Thank you. https://video.infiniteloop.tv/w/hz9eG6UezEZmcohmwS3J2M |
It's really quite easy:
Assume a display (determined by font size and ideally mono-spaced, as proportional fonts will vary the amount of text on each line.
Example: 40-lines of 80-characters.
char *myStrings[] = {"String 1","String 2", ... "String 40"}; ideally all blank with ""
Create the array with 40 strings to initialise it.
Create a function (MoveArray()) to display all 40 lines using the x,y coordinates, which will need a few tests, do starts be displaying all 40-lines, then on the next new line move the array elements by 1 so element 2 to element 1, repeat for all subsequent elements until line 40 then re-initialise line 40, add the new line to e…