adafruit / Adafruit_CircuitPython_DisplayIO_SSD1306

DisplayIO driver for SSD1306 monochrome OLED displays
MIT License
57 stars 24 forks source link

Add support for small 0.66" 64x48 OLED #38

Closed asmagill closed 7 months ago

asmagill commented 8 months ago

Adds displayio support for 0.66" 64x48 OLED displays. Works for 0 and 180 rotation; I suspect 90/270 requires additional changes in logic deeper in displayio and I don't require this yet, so I haven't pursued it.

Tested with https://www.amazon.com/gp/product/B07QF7QK6P/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 (currently unavailable) and a replacement screen (same logic board) from https://www.buydisplay.com/small-0-66-inch-white-64x48-oled-display-module-ssd1306-serial-spi-i2c.

dglaude commented 8 months ago

I think you should also update the documentation part on the top of the file to say that it is now working with 64x48 and the link you provided. It is the "Hardware" section.

Please notice that I have burned my 0.49'' 64x32 and I have no way to test anymore if the code continue to work. Also, I am almost sure I never tested rotation in my code, so it is great that you tested at least some (180) of the rotation in this update.

tannewt commented 8 months ago

Please use pre-commit to standardize the formatting: https://learn.adafruit.com/improve-your-code-with-pylint/check-your-code-with-pre-commit

asmagill commented 8 months ago
% pre-commit run --all-files
black....................................................................Passed
reuse....................................................................Passed
check yaml...............................................................Passed
fix end of files.........................................................Passed
trim trailing whitespace.................................................Passed
pylint (library code)....................................................Passed
pylint (example code)....................................................Passed
pylint (test code)...................................(no files to check)Skipped