Skip to content

Add hardware scrolling functionalities. #7681

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

Closed
wants to merge 1 commit into from

Conversation

codemee
Copy link

@codemee codemee commented Aug 18, 2021

Changes to be committed:
modified: drivers/display/ssd1306.py

The scroll method in the MicroPython's ssd1306 class is based on FrameBuffer class's scroll().That may leave a footprint of the previous colors in the FrameBuffer.

By adopting the modified version of the ssd1306 class written by Tim Toliver, we add the following methods to the ssd1306 class:

  • clear():clear the OLED.
  • hw_scroll_h(direction=True, interval=FRAMES_5):continuously scroll to right/left.
    • direction: True/False, scroll to right/left.
    • interval:
      • SSD1306.FRAMES_2
      • SSD1306.FRAMES_3
      • SSD130.FRAMES_4
      • SSD130.FRAMES_5
      • SSD130.FRAMES_25
      • SSD130.FRAMES_64
      • SSD130.FRAMES_128
      • SSD130.FRAMES_256
        One frame approximate 9.19ms.
  • hw_scroll_diag(direction=True, interval=FRAMES_5, offset=1):continuously scroll to up-right/up-left.
    • offset: vertical offset per scroll.
  • hw_scroll_off():stop scrolling.

Changes to be committed:
modified:   drivers/display/ssd1306.py

The scroll method in the MicroPython's ssd1306 class is based on FrameBuffer class's scroll().That may leave a footprint of the previous colors in the FrameBuffer.

By adopting the modified version of the ssd1306 class written by Tim Toliver, we add the following methods to the ssd1306 class:

    - clear():clear the OLED.
    - hw_scroll_h(direction=True, interval=FRAMES_5):continuously scroll to right/left.
        - direction: True/False, scroll to right/left.
        - interval:
            - SSD1306.FRAMES_2
            - SSD1306.FRAMES_3
            - SSD130.FRAMES_4
            - SSD130.FRAMES_5
            - SSD130.FRAMES_25
            - SSD130.FRAMES_64
            - SSD130.FRAMES_128
            - SSD130.FRAMES_256
            One frame approximate 9.19ms.
    - hw_scroll_diag(direction=True, interval=FRAMES_5, offset=1):continuously scroll to up-right/up-left.
        - offset: vertical offset per scroll.
    - hw_scroll_off():stop scrolling.
@mcauser
Copy link
Contributor

mcauser commented Aug 27, 2021

Perhaps expose the page and column addresses as arguments so you can hw scroll a portion of the display instead of the entire display?

@codemee
Copy link
Author

codemee commented Sep 1, 2021

That's a good idea. I'll take time to make this done.

@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Oct 15, 2021
@jimmo
Copy link
Member

jimmo commented Nov 15, 2022

Thanks @codemee -- This seems useful, but closing due to inactivity. Please feel free to re-open this, but note that the driver has moved to micropython-lib.

@jimmo jimmo closed this Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extmod Relates to extmod/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy