Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added scrollUP() to automatically scroll a display when println() is used #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

psionprime
Copy link

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

-- add function scrollUp() for use in Adafruit_GFX write() for println()

- only supporting standard font for ssd1306 OLED 128x32
- SSD1306_BUFF_SIZE definition set to use number instead of depricated #defines
-- macro inside macro is out of scope for doxygen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant