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

Add support for small 0.66" 64x48 OLED #38

Merged
merged 3 commits into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion adafruit_displayio_ssd1306.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* `Monochrome 128x32 SPI OLED graphic display <https://www.adafruit.com/product/661>`_
* `Adafruit FeatherWing OLED - 128x32 OLED <https://www.adafruit.com/product/2900>`_
* Monochrome 0.49" 64x32 I2C OLED graphic display
* Monochrome 0.66" 64x48 I2C OLED graphic display (eg https://www.amazon.com/gp/product/B07QF7QK6P)
* Might work on other sub-128 width display: Dots 72x40, 64x48, 96x16

**Software and Dependencies:**
Expand Down Expand Up @@ -87,12 +88,15 @@ def __init__(
col_offset = (
0 if width == 128 else (128 - width) // 2
) # https://github.com/micropython/micropython/pull/7411
row_offset = (
col_offset if (kwargs["height"] != 48 or kwargs["width"] != 64) else 0
) # fix for 0.66" 64x48 OLED
super().__init__(
bus,
init_sequence,
**kwargs,
colstart=col_offset,
rowstart=col_offset,
rowstart=row_offset,
color_depth=1,
grayscale=True,
pixels_in_byte_share_row=False,
Expand Down