Closed
Description
Just got this product in: https://www.adafruit.com/product/1028
Using it with this product: https://www.adafruit.com/product/5477
Exactly the same as this issue: adafruit/Adafruit_CircuitPython_IL0373#28
CircuitPython Version: Adafruit CircuitPython 8.1.0-beta.0-50-ge1f16472c on 2023-03-22; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3
Wiring:
EPD | ESP32-S3 |
---|---|
VIN | 3V3 |
3V3 | |
GND | GND |
SCK | SCK |
MISO | MI |
MOSI | MO |
ECS | D9 |
D/C | D10 |
SRCS | D6 |
SDCS | D5 |
RST | |
BUSY | D11 |
ENA |
Code (pretty much exactly from he sample, I only remove the reset pin.):
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
"""Simple test script for Adafruit 2.9" 296x128 tri-color display
Supported products:
* Adafruit 2.9" Tri-Color Display Breakout
* https://www.adafruit.com/product/1028
"""
import time
import board
import displayio
import adafruit_uc8151d
# Used to ensure the display is free in CircuitPython
displayio.release_displays()
# Define the pins needed for display use
# This pinout is for a Feather M4 and may be different for other boards
spi = board.SPI() # Uses SCK and MOSI
epd_cs = board.D9
epd_dc = board.D10
epd_reset = None
epd_busy = board.D11
# Create the displayio connection to the display pins
display_bus = displayio.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)
time.sleep(1) # Wait a bit
# Create the display object - the third color is red (0xff0000)
display = adafruit_uc8151d.UC8151D(
display_bus,
width=296,
height=128,
rotation=270,
busy_pin=epd_busy,
highlight_color=0xFF0000,
)
# Create a display group for our screen objects
g = displayio.Group()
# Display a ruler graphic from the root directory of the CIRCUITPY drive
with open("/display-ruler.bmp", "rb") as f:
pic = displayio.OnDiskBitmap(f)
# Create a Tilegrid with the bitmap and put in the displayio group
# CircuitPython 6 & 7 compatible
t = displayio.TileGrid(
pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter())
)
# CircuitPython 7 compatible only
# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
g.append(t)
# Place the display group on the screen
display.show(g)
# Refresh the display to have it actually show the image
# NOTE: Do not refresh eInk displays sooner than 180 seconds
display.refresh()
print("refreshed")
time.sleep(180)
I am using this BMP: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_UC8151D/main/examples/display-ruler.bmp