diff --git a/adafruit_ssd1680.py b/adafruit_ssd1680.py index 490725f..f64d3dc 100755 --- a/adafruit_ssd1680.py +++ b/adafruit_ssd1680.py @@ -18,6 +18,7 @@ Implementation Notes * `Adafruit 2.13" Tri-Color eInk Display Breakout `_ * `Adafruit 2.13" Tri-Color eInk Display FeatherWing `_ +* `Adafruit 2.13" Mono eInk Display FeatherWing `_ **Software and Dependencies:** @@ -51,6 +52,7 @@ class SSD1680(displayio.EPaperDisplay): r"""SSD1680 driver :param bus: The data bus the display is on + :param column_correction: Adjust colstart, defaults to 1 (``int``) :param \**kwargs: See below @@ -63,7 +65,7 @@ class SSD1680(displayio.EPaperDisplay): Display rotation """ - def __init__(self, bus: displayio.Fourwire, **kwargs) -> None: + def __init__(self, bus: displayio.Fourwire, column_correction=1, **kwargs) -> None: stop_sequence = bytearray(_STOP_SEQUENCE) try: bus.reset() @@ -95,6 +97,6 @@ class SSD1680(displayio.EPaperDisplay): set_current_column_command=0x4E, set_current_row_command=0x4F, refresh_display_command=0x20, - colstart=1, + colstart=column_correction, always_toggle_chip_select=True, - ) + ) \ No newline at end of file diff --git a/examples/ssd1680_simpletest.py b/examples/ssd1680_simpletest.py index a8642e7..7a41395 100644 --- a/examples/ssd1680_simpletest.py +++ b/examples/ssd1680_simpletest.py @@ -9,10 +9,9 @@ Supported products: * https://www.adafruit.com/product/4947 * Adafruit 2.13" Tri-Color eInk Display FeatherWing * https://www.adafruit.com/product/4814 + * Adafruit 2.13" Mono eInk Display FeatherWing + * https://www.adafruit.com/product/4195 -To use Adafruit 2.13" Monochrome FeatherWing - 250x122 Monochrome with SSD1680: - * https://www.adafruit.com/product/4195 - Set change height in display from 122 to 127 """ @@ -35,8 +34,10 @@ display_bus = displayio.FourWire( ) time.sleep(1) +# For issues with display not updating top/bottom rows correctly set column_correction to 8 display = adafruit_ssd1680.SSD1680( display_bus, + column_correction=1, width=250, height=122, busy_pin=epd_busy, @@ -44,6 +45,7 @@ display = adafruit_ssd1680.SSD1680( rotation=270, ) + g = displayio.Group() with open("/display-ruler.bmp", "rb") as f: