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

Print() scrolling text #4

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

LiamHowell
Copy link
Contributor

Added print functions as suggested in User-experience improvements #2, along with an example tested on a Raspberry Pi Pico.

All arguments for the print() function are documented, the other supporting functions remain undocumented in the README.

Cheers,
Liam.

Liam Howell added 2 commits August 5, 2022 00:05
Added print(), trunctate_text(), draw_print_text(), _init_print_text_func() along with print.py in examples
@CoreProduction
Copy link
Collaborator

CoreProduction commented Aug 9, 2022

I'm taking this for a test drive! The expected scrolling behaviour is really nice!
I have taken the print.py example and reduced it into the following. I expected the text to appear part-way up the screen, but it still appears at the bottom line, and scrolls up.

from PiicoDev_Unified import sleep_ms

display = create_PiicoDev_SSD1306()
display.fill(0)

display.print("insert 1", line_num = 3)
display.print("insert 2", line_num = 4)

produces the result

[blank lines above]
insert 1
insert 2

Is the line_num feature still under heavy development? Or did I find a bug?

Liam Howell and others added 3 commits August 11, 2022 22:52
Added a property to get the display size, text colour is stored in disp_lst and temp_lst,, font size is stored in the library for other functions to access, general cleaning
@LiamHowell
Copy link
Contributor Author

LiamHowell commented Aug 11, 2022

Hi Michael,

Good catch, a bit of both, the argument auto_scroll was required to insert lines at specific locations which didn't make too much sense.
Thanks for the feedback! I've fixed the issue and added more functionality to allow Makers to create menus with an included example.

https://github.com/LiamHowell/CE-PiicoDev-SSD1306-MicroPython-Module/blob/print()-scrolling-text/example/print_menu.py

Also included is a way to access the display's height and width from a property

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.

None yet

2 participants