From 33378e6de86d774166eea741eb203616824b0289 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 20 May 2025 12:43:23 -0700 Subject: [PATCH 1/4] Update Bonnet example to reflect latest hardware --- examples/ssd1680_2.13_mono_eink_bonnet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/ssd1680_2.13_mono_eink_bonnet.py b/examples/ssd1680_2.13_mono_eink_bonnet.py index a21f57c..2557df6 100644 --- a/examples/ssd1680_2.13_mono_eink_bonnet.py +++ b/examples/ssd1680_2.13_mono_eink_bonnet.py @@ -35,7 +35,7 @@ display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000) time.sleep(1) -# For issues with display not updating top/bottom rows correctly set colstart to 8 +# For issues with display not updating top/bottom rows correctly try setting colstart to 8 or 0 display = adafruit_ssd1680.SSD1680( display_bus, width=250, @@ -43,6 +43,7 @@ busy_pin=epd_busy, highlight_color=0xFF0000, rotation=90, + colstart=-8, ) From b7d511711c8f5557082d9c4307a89ecdec608727 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Wed, 4 Jun 2025 10:00:20 -0500 Subject: [PATCH 2/4] update rtd.yml file Signed-off-by: foamyguy --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 88bca9f..255dafd 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,7 +12,7 @@ sphinx: configuration: docs/conf.py build: - os: ubuntu-20.04 + os: ubuntu-lts-latest tools: python: "3" From 130e7f1f21772c7ce2f8f87b50fcdd7596f62dba Mon Sep 17 00:00:00 2001 From: BlitzCityDIY Date: Wed, 25 Jun 2025 14:30:27 -0400 Subject: [PATCH 3/4] Create ssd1680_2.9_tricolor_breakout.py --- examples/ssd1680_2.9_tricolor_breakout.py | 57 +++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 examples/ssd1680_2.9_tricolor_breakout.py diff --git a/examples/ssd1680_2.9_tricolor_breakout.py b/examples/ssd1680_2.9_tricolor_breakout.py new file mode 100644 index 0000000..8395f46 --- /dev/null +++ b/examples/ssd1680_2.9_tricolor_breakout.py @@ -0,0 +1,57 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2023 Jose D. Montoya +# +# SPDX-License-Identifier: Unlicense + + +"""Simple test script for Adafruit 2.9" Tri-Color eInk Display Breakout +Supported products: + * Adafruit 2.9" Tri-Color eInk Display Breakout + * https://www.adafruit.com/product/1028 + +""" + +import time + +import board +import displayio +from fourwire import FourWire + +import adafruit_ssd1680 + +displayio.release_displays() + +# This pinout works on a Metro M4 and may need to be altered for other boards. +spi = board.SPI() # Uses SCK and MOSI +epd_cs = board.D9 +epd_dc = board.D10 +epd_reset = board.D5 +epd_busy = board.D6 + +display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, baudrate=1000000) +time.sleep(1) + +display = adafruit_ssd1680.SSD1680( + display_bus, + width=296, + height=128, + highlight_color=0xFF0000, + rotation=270, +) + +g = displayio.Group() + +with open("/display-ruler.bmp", "rb") as f: + pic = displayio.OnDiskBitmap(f) + + t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) + + g.append(t) + + display.root_group = g + + display.refresh() + + print("refreshed") + + time.sleep(120) From 841e39e3ee37df06cf87b6767029680a565c7d01 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Fri, 27 Jun 2025 09:22:29 -0500 Subject: [PATCH 4/4] use new OnDiskBitmap init API --- README.rst | 12 ++-------- examples/ssd1680_2.13_featherwing.py | 26 +++++++++++----------- examples/ssd1680_2.13_mono_eink_bonnet.py | 26 +++++++++++----------- examples/ssd1680_2.13_tricolor_breakout.py | 16 ++++++------- examples/ssd1680_2.9_tricolor_breakout.py | 16 ++++++------- examples/ssd1680_simpletest.py | 26 +++++++++++----------- 6 files changed, 57 insertions(+), 65 deletions(-) diff --git a/README.rst b/README.rst index fdde842..0d67c6d 100644 --- a/README.rst +++ b/README.rst @@ -103,16 +103,8 @@ Usage Example g = displayio.Group() - # CircuitPython 6 & 7 compatible - f = open("/display-ruler.bmp", "rb") - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid( - pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter()) - ) - - # # CircuitPython 7 compatible only - # pic = displayio.OnDiskBitmap("/display-ruler.bmp") - # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) + pic = displayio.OnDiskBitmap("/display-ruler.bmp") + t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) g.append(t) diff --git a/examples/ssd1680_2.13_featherwing.py b/examples/ssd1680_2.13_featherwing.py index aeeb31e..9e9f5ef 100644 --- a/examples/ssd1680_2.13_featherwing.py +++ b/examples/ssd1680_2.13_featherwing.py @@ -42,25 +42,25 @@ g = displayio.Group() -with open("/display-ruler.bmp", "rb") as f: - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) +pic = displayio.OnDiskBitmap("/display-ruler.bmp") - g.append(t) +t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - display.root_group = g +g.append(t) - display.refresh() +display.root_group = g - print("refreshed") +display.refresh() - time.sleep(display.time_to_refresh + 5) - # Always refresh a little longer. It's not a problem to refresh - # a few seconds more, but it's terrible to refresh too early - # (the display will throw an exception when if the refresh - # is too soon) - print("waited correct time") +print("refreshed") + +time.sleep(display.time_to_refresh + 5) +# Always refresh a little longer. It's not a problem to refresh +# a few seconds more, but it's terrible to refresh too early +# (the display will throw an exception when if the refresh +# is too soon) +print("waited correct time") # Keep the display the same diff --git a/examples/ssd1680_2.13_mono_eink_bonnet.py b/examples/ssd1680_2.13_mono_eink_bonnet.py index 2557df6..ef58241 100644 --- a/examples/ssd1680_2.13_mono_eink_bonnet.py +++ b/examples/ssd1680_2.13_mono_eink_bonnet.py @@ -49,23 +49,23 @@ g = displayio.Group() -with open("display-ruler.bmp", "rb") as f: - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - g.append(t) - display.root_group = g +pic = displayio.OnDiskBitmap("/display-ruler.bmp") +t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) +g.append(t) - display.refresh() +display.root_group = g - print("refreshed") +display.refresh() - time.sleep(display.time_to_refresh + 5) - # Always refresh a little longer. It's not a problem to refresh - # a few seconds more, but it's terrible to refresh too early - # (the display will throw an exception when if the refresh - # is too soon) - print("waited correct time") +print("refreshed") + +time.sleep(display.time_to_refresh + 5) +# Always refresh a little longer. It's not a problem to refresh +# a few seconds more, but it's terrible to refresh too early +# (the display will throw an exception when if the refresh +# is too soon) +print("waited correct time") # Keep the display the same diff --git a/examples/ssd1680_2.13_tricolor_breakout.py b/examples/ssd1680_2.13_tricolor_breakout.py index 7329dbc..cf1230f 100644 --- a/examples/ssd1680_2.13_tricolor_breakout.py +++ b/examples/ssd1680_2.13_tricolor_breakout.py @@ -41,17 +41,17 @@ g = displayio.Group() -with open("/display-ruler.bmp", "rb") as f: - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) +pic = displayio.OnDiskBitmap("/display-ruler.bmp") - g.append(t) +t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - display.root_group = g +g.append(t) - display.refresh() +display.root_group = g - print("refreshed") +display.refresh() - time.sleep(120) +print("refreshed") + +time.sleep(120) diff --git a/examples/ssd1680_2.9_tricolor_breakout.py b/examples/ssd1680_2.9_tricolor_breakout.py index 8395f46..922878d 100644 --- a/examples/ssd1680_2.9_tricolor_breakout.py +++ b/examples/ssd1680_2.9_tricolor_breakout.py @@ -41,17 +41,17 @@ g = displayio.Group() -with open("/display-ruler.bmp", "rb") as f: - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) +pic = displayio.OnDiskBitmap("/display-ruler.bmp") - g.append(t) +t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - display.root_group = g +g.append(t) - display.refresh() +display.root_group = g - print("refreshed") +display.refresh() - time.sleep(120) +print("refreshed") + +time.sleep(120) diff --git a/examples/ssd1680_simpletest.py b/examples/ssd1680_simpletest.py index 0613236..8b3bcb9 100644 --- a/examples/ssd1680_simpletest.py +++ b/examples/ssd1680_simpletest.py @@ -51,23 +51,23 @@ g = displayio.Group() # Note: Check the name of the file. Sometimes the dash is changed to an underscore -with open("/display-ruler.bmp", "rb") as f: - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - g.append(t) - display.root_group = g +pic = displayio.OnDiskBitmap("/display-ruler.bmp") +t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) +g.append(t) - display.refresh() +display.root_group = g - print("refreshed") +display.refresh() - time.sleep(display.time_to_refresh + 5) - # Always refresh a little longer. It's not a problem to refresh - # a few seconds more, but it's terrible to refresh too early - # (the display will throw an exception when if the refresh - # is too soon) - print("waited correct time") +print("refreshed") + +time.sleep(display.time_to_refresh + 5) +# Always refresh a little longer. It's not a problem to refresh +# a few seconds more, but it's terrible to refresh too early +# (the display will throw an exception when if the refresh +# is too soon) +print("waited correct time") # Keep the display the same 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