Adafruit_SSD1306
Adafruit_SSD1306 copied to clipboard
added scrollUP() to automatically scroll a display when println() is used
This is my first pull request to a public project ever so hopefully it's fine, otherwise let me know so I can improve. I tried implementing this keeping in mind other products but I am not sure this will be okay. By all means, have a more experienced person change what is required.
This was developed on a Adafruit Huzzah32 Feather stack with an OLED 128x32 Wing using the Adafruit Arduino support libraries on Win10x64 MS Visual Studio 2017 Community Edition with VisualGDB extensions supporting my Segger J-Link for JTAG debugging.
This function is called from Adafruit_GFX (pull coming soon)::write() to scroll the display is cursorY is greater than the display height. It will also call the driver display() function. This function is to allow the print system to display as many other terminals do. Printing without \n will work as expected. I can see adding a flag to toggle this behavior.
- only supporting standard font for ssd1306 OLED 128x32 as that is all I have to test on
Thanks Adafruit for the openness of your systems !
Attached is an Arduino test sketch. Please remember you need my fork of Adafruit_GFX for it to work: scroll-print.zip