Waveshare E-paper Display for Pico

Posted on March 15, 2023

Here is the same thing but for the Waveshare e-paper display for pico. This version (B) also displays red.

import time
import board
import busio
import digitalio
import requests
import adafruit_apds9960.apds9960
import adafruit_matrixportal.network
import adafruit_matrixportal.matrix
import adafruit_matrixportal_imageload
import adafruit_matrixportal_imagedisplay
import adafruit_pixel_shader
import adafruit_fancyled.adafruit_fancyled as fancy

# Set up the I2C bus for the APDS9960 gesture sensor
i2c = busio.I2C(board.SCL, board.SDA)

# Initialize the gesture sensor
gesture_sensor = adafruit_apds9960.apds9960.APDS9960(i2c)

# Initialize the MatrixPortal network and matrix
matrixportal_network = adafruit_matrixportal.network.MatrixPortalNetwork()
matrixportal_matrix = adafruit_matrixportal.matrix.Matrix()

# Initialize the E-Ink display
display = adafruit_matrixportal_imagedisplay.EPD_Display(
    busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO),

# Set up the pixel shader for dithering
shader = adafruit_pixel_shader.PixelShader(
    width=display.width, height=display.height, brightness=1.0

# Set up the color palette for dithering
palette = [
    fancy.CRGB(255, 255, 255),  # white
    fancy.CRGB(255, 0, 0),  # red
    fancy.CRGB(0, 0, 0),  # black

# Set up the image display object
image_display = adafruit_matrixportal_imagedisplay.ImageDisplay(

Comments are closed.