Skip to content

Latest commit

 

History

History
28 lines (26 loc) · 1.55 KB

README.md

File metadata and controls

28 lines (26 loc) · 1.55 KB

adafruitTFTScroller

Watch the video

Sample of scrolling the HX8357 through hardware in portrait mode. I wanted a way to dump Serial to this little screen, which required some sort of scrolling. I could not find anything except the hardware manual for the chip to perform scrolling so I wrote this little class to implement a smooth scroll. This class uses the AdaFruit HX8357 tft driver, but could probably be used with other drivers using similar hardware.

You can get the board from here:
https://www.amazon.com/gp/product/B00TIYUWNY/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
or AdaFruit directly at:
https://www.adafruit.com/?q=hxd8357d


Class inherits from Print.
Additional methods:
config(int rotation, int textsize);
Calls the underlying TFT methods for rotation and text size.
setTextSize(int textsize);
Sets text size. Can be used between calls to change text size between output calls.
SetTextColor(unsigned short)
Set text color.
SetBackgroundColor(unsigned short)
Set text background color.
setLinePadSize(int y);
Sets number of pixels between each line of text. Defaults to two.


Limitations:
No word wrap. Currently truncates anything greater than max chars per line (320 / 8 * textsize).