The Waveshare e-Paper Driver HAT is a versatile hardware attachment designed for Raspberry Pi. It facilitates the control and display of e-Paper screens, supporting various screen sizes. This HAT provides an easy-to-use interface for seamless integration with your projects, making it ideal for applications such as electronic signage, e-books, and low-power displays.
Specification | Value |
---|---|
Manufacturer | Waveshare |
Part ID | e-Paper Driver HAT |
Operating Voltage | 3.3V/5V |
Interface | SPI |
Supported e-Paper Sizes | 1.54", 2.13", 2.7", 2.9", 4.2", 5.83", 7.5" |
Dimensions | 65mm x 30mm |
Weight | 15g |
Pin Number | Pin Name | Description |
---|---|---|
1 | 3.3V | Power supply (3.3V) |
2 | 5V | Power supply (5V) |
3 | GND | Ground |
4 | CS | Chip Select (SPI) |
5 | SCK | Serial Clock (SPI) |
6 | MOSI | Master Out Slave In (SPI) |
7 | MISO | Master In Slave Out (SPI) |
8 | DC | Data/Command control |
9 | RST | Reset |
10 | BUSY | Busy signal |
Connect the e-Paper Driver HAT to Raspberry Pi:
Connect the e-Paper Display:
Power Up:
Install Required Libraries:
sudo apt-get update
sudo apt-get install python3-pip
sudo pip3 install RPi.GPIO spidev
Run Example Code:
Use the provided example code to test the display. Below is a sample code snippet for displaying text on the e-Paper screen using Python:
import spidev
import RPi.GPIO as GPIO
from time import sleep
# Pin configuration
RST_PIN = 17
DC_PIN = 25
CS_PIN = 8
BUSY_PIN = 24
# Initialize GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(RST_PIN, GPIO.OUT)
GPIO.setup(DC_PIN, GPIO.OUT)
GPIO.setup(CS_PIN, GPIO.OUT)
GPIO.setup(BUSY_PIN, GPIO.IN)
# Initialize SPI
spi = spidev.SpiDev(0, 0)
spi.max_speed_hz = 2000000
def reset():
GPIO.output(RST_PIN, GPIO.HIGH)
sleep(0.2)
GPIO.output(RST_PIN, GPIO.LOW)
sleep(0.2)
GPIO.output(RST_PIN, GPIO.HIGH)
sleep(0.2)
def send_command(command):
GPIO.output(DC_PIN, GPIO.LOW)
GPIO.output(CS_PIN, GPIO.LOW)
spi.writebytes([command])
GPIO.output(CS_PIN, GPIO.HIGH)
def send_data(data):
GPIO.output(DC_PIN, GPIO.HIGH)
GPIO.output(CS_PIN, GPIO.LOW)
spi.writebytes([data])
GPIO.output(CS_PIN, GPIO.HIGH)
def init_display():
reset()
send_command(0x01) # Power setting
send_data(0x03)
send_data(0x00)
send_data(0x2b)
send_data(0x2b)
send_command(0x06) # Booster soft start
send_data(0x17)
send_data(0x17)
send_data(0x17)
send_command(0x04) # Power on
sleep(0.1)
send_command(0x00) # Panel setting
send_data(0xbf)
send_data(0x0d)
send_command(0x30) # PLL control
send_data(0x3a)
send_command(0x61) # Resolution setting
send_data(0x01)
send_data(0x90)
send_data(0x01)
send_data(0x2c)
send_command(0x82) # VCOM DC setting
send_data(0x12)
send_command(0x50) # VCOM and data interval setting
send_data(0x97)
def display_text():
init_display()
# Add code to display text here
# This is a placeholder for actual display logic
if __name__ == "__main__":
display_text()
Display Not Turning On:
Partial or Distorted Display:
No Response from Display:
By following this documentation, users can effectively integrate and utilize the Waveshare e-Paper Driver HAT in their projects, ensuring a smooth and efficient experience.