Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
| Display Size | 160.0mm × 96.0mm |
| Outline Dimensions | 154.0mm × 214.0mm × 32.0mm |
| Screen Pixel Pitch | 0.2mm × 0.2mm |
| Screen Resolution | 800 × 480 |
| Display Color | Black, White, Green, Blue, Red, Yellow |
| Grayscale | 2 |
| Refresh Time | 12s |
| Charging Voltage/Operating Voltage | 5V |
Drag the image onto convert.exe
Put the images, convert.exe, and converterTo6color_all.cmd in a folder, and then double-click converterTo6color_all.cmd
Put the images, convert, and converterTo6color_all in a folder
Open the terminal and enter the corresponding folder
cd xxxx/xxx/xxx/
Enter the command to grant the convert executable permission
sudo chmod +x convert
Image conversion
./convert image name
You need to perform permission operations on the convert file first
Enter a command to give converterTo6color_all.sh executable permissions
sudo chmod +x converterTo6color_all.sh
Image conversion
./converterTo6color_all.sh
Refer to Dylan's open-source program on GitHub for building: https://github.com/dylski/PaperPiAI
The construction is relatively complex, and the process requires networking. You can also use the system we have already built
sudo apt-get update sudo apt-get upgrade
sudo apt install git
git clone https://github.com/dylski/PaperPiAI.git cd PaperPiAI scripts/install.sh # You can install it directly using the installation script, or by executing the commands in the shell file step by step
sudo apt-get -y install tmux vim sudo apt-get -y install cmake sudo apt-get -y install python3-dev python3-venv python3-pip sudo apt-get -y install imagemagick sudo apt-get -y install git git-lfs sudo apt-get -y install libopencv-dev python3-opencv
cd PaperPiAI
python3 -m venv venv
PS: Why install a virtual environment?
Under the official requirements of Python, some python libraries can only be installed in a virtual environment
The latest Raspberry Pi system also did the same
. venv/bin/activate
python -m pip install opencv_contrib_python python -m pip install inky[rpi]==1.5.0 python -m pip install pillow
cd ~/PaperPiAI git clone https://github.com/google/XNNPACK.git cd XNNPACK git checkout 1c8ee1b68f3a3e0847ec3c53c186c5909fa3fbd3 mkdir build cd build cmake -DXNNPACK_BUILD_TESTS=OFF -DXNNPACK_BUILD_BENCHMARKS=OFF .. # Here you need to download some corresponding repositories from github cmake --build . --config Release # The zero 2W here compiles for more than three hours
cd ~/PaperPiAI git clone https://github.com/vitoplantamura/OnnxStream.git cd OnnxStream cd src mkdir build cd build cmake -DMAX_SPEED=ON -DOS_LLM=OFF -DOS_CUDA=OFF -DXNNPACK_DIR="${INSTALL_DIR}/XNNPACK" .. # Here you need to download some corresponding repositories from github cmake --build . --config Release # Here zero 2W compilation takes about ten minutes
cd ~/PaperPiAI mkdir models cd models git clone --depth=1 https://huggingface.co/vitoplantamura/stable-diffusion-xl-turbo-1.0-anyshape-onnxstream #Download about 9G
sudo nano /etc/dphys-swapfile

sudo /etc/init.d/dphys-swapfile restart
wget https://files.waveshare.com/wiki/RPi_Zero_PhotoPainter/Demo/RPi_Zero_PhotoPainter.zip unzip -o RPi_Zero_PhotoPainter.zip -d RPi_Zero_PhotoPainter cd RPi_Zero_PhotoPainter cp -r Waveshare_E-Paper ~/PaperPiAI # The path for building large models before with PaperPiAI cd cd ~
cd PaperPiAI python Waveshare_E-Paper/generate_picture.py --steps 1 # Generate images using random instructions in the default configuration python3 Waveshare_E-Paper/display_picture.py -m epd7in3e
cd PaperPiAI python Waveshare_E-Paper/generate_picture.py --steps 1 # Generate images using random instructions in the default configuration python3 Waveshare_E-Paper/display_picture.py -m epd7in3e
PaperPiAI/output_dir
Waveshare_E-Paper/flowers.json
--prompt Use the prompt directly, overriding the prompt file (empty by default)
--prompts Prompt the configuration file path (default Waveshare_E-Paper/flowers.json)
--seed Random seed reproduction
--steps Number of generation steps (Higher = better quality but slower, default 5, recommended 1 step)
zero2w: 1 step takes about 34 minutes; 5 steps take about 1.5 hours
Pi5: 1 step takes about 5 minutes; 5 steps takes about 34 minutes
--width Image width (default 800)
--height Image height (default 480)
--sd Stable diffusion binary path (not recommended to modify)
--model Stable diffusion model path (not recommended to modify)
--overwrite Overwrite existing output files
--no-copy Do not copy to shared files
PaperPiAI/output_dir/output.png
PaperPiAI/output_dir #The output name is: processed_TIMESTAMP.png
-o Output path and name -p Portrait mode (forced rotation 90°) -c Center cropping, not smart cropping -r Only resize the image without cropping -s Simulated display, no actual output -m Display model (e.g., epd7in3e) --skip-fit If the image size matches the display perfectly, skip the adjustment
Use image data at the specified location (place the image position at the end of the command, no need to input the corresponding operation command)
python3 Waveshare_E-Paper/display_picture.py -m epd7in3e ./output_dir/processed_20250729_122744.png
#Download the demo (skip if already downloaded) wget https://files.waveshare.com/wiki/RPi_Zero_PhotoPainter/Demo/RPi_Zero_PhotoPainter.zip unzip -o RPi_Zero_PhotoPainter.zip -d RPi_Zero_PhotoPainter #Enter the script directory cd RPi_Zero_PhotoPainter/script_code cp -r cron_flower.sh ~/PaperPiAI # PaperPiAI is the path to building large models #If you want to display Chinese logs, please transmit the following script # cp -r cron_flower-CN.sh ~/PaperPiAI # Enter the project directory (modify according to your own large model folder) cd /home/pi/PaperPiAI
chmod +x /home/pi/PaperPiAI/cron_flower.sh
./cron_flower.sh
> /home/pi/PaperPiAI/image_update.log
> /home/pi/PaperPiAI/cron_flower.log
crontab -e
Select an editor. To change later, run 'select-editor'. 1. /bin/nano <---- easiest 2. /usr/bin/vim.basic 3. /usr/bin/vim.tiny 4. /bin/ed Choose 1-4 [1]:
0 8 * * * /home/pi/PaperPiAI/cron_flower.sh >> /home/pi/PaperPiAI/cron_log.log 2>&1
0 8 * * * 0: Minute 8: Hour * * *: Year Month Day /home/pi/PaperPiAI/cron_flower.sh Script path >> Log append output → Each time the script runs, the log will be appended to the end of cron_log.log, and the file will continue to grow with each run; /home/pi/PaperPiAI/cron_log.log The path where logs are saved 2>&1 Redirect error logs to the same file as well, mixing them with normal logs;
> /home/pi/PaperPiAI/cron_log.log
sudo dpkg-reconfigure tzdata



Please note that the PWR pin of this circuit is different from the PWR pin used in our general demo. If using the program from the general demo, make sure to modify it accordingly
| e-Paper | Raspberry Pi | |
| BCM2835 encoding | Board physical pin number | |
| VCC | 3.3V | 3.3V |
| GND | GND | GND |
| DIN | MOSI | 19 |
| CLK | SCLK | 23 |
| CS | CE0 | 24 |
| DC | 25 | 22 |
| RST | 17 | 11 |
| BUSY | 24 | 18 |
| PWR | 27 | 13 |
sudo raspi-config Select Interfacing Options -> SPI -> Yes to enable the SPI interface

sudo reboot

![]()
#Open the Raspberry Pi terminal and run the following commands: wget https://github.com/joan2937/lg/archive/master.zip unzip master.zip cd lg-master make sudo make install # For more information, please refer to the source code: https://github.com/gpiozero/lg
#Open the Raspberry Pi terminal and run the following commands: sudo apt-get update sudo apt install gpiod libgpiod-dev
#Open the Raspberry Pi terminal and run the following commands: wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz tar zxvf bcm2835-1.71.tar.gz cd bcm2835-1.71/ sudo ./configure && sudo make && sudo make check && sudo make install # For more information, please refer to the official website: http://www.airspayce.com/mikem/bcm2835/
#Open the Raspberry Pi terminal and run the following commands: sudo apt-get install wiringpi #For Raspberry Pi systems after May 2019 (those earlier may not require execution), an upgrade may be necessary: wget https://files.waveshare.com/wiki/common/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v # Run gpio -v and version 2.52 will appear. If it does not appear, there is an installation error. #Bullseye branch system uses the following command: git clone https://github.com/WiringPi/WiringPi cd WiringPi ./build gpio -v # Run gpio -v and version 2.60 will appear. If it does not appear, there is an installation error.
wget https://files.waveshare.com/wiki/RPi_Zero_PhotoPainter/Demo/RPi_Zero_PhotoPainter.zip unzip -o RPi_Zero_PhotoPainter.zip -d RPi_Zero_PhotoPainter cd RPi_Zero_PhotoPainter/7in3_e-Paper_E
# At this point in RPi_Zero_PhotoPainter/7in3_e-Paper_E location cd c sudo make clean sudo make -j4
sudo ./epd
sudo apt-get update sudo apt-get install python3-pip sudo apt-get install python3-pil sudo apt-get install python3-numpy sudo pip3 install spidev
sudo apt-get update sudo apt-get install python-pip sudo apt-get install python-pil sudo apt-get install python-numpy sudo pip install spidev
sudo apt-get update # python3 sudo apt install python3-gpiozero # python2 sudo apt install python-gpiozero
wget https://files.waveshare.com/wiki/RPi_Zero_PhotoPainter/Demo/RPi_Zero_PhotoPainter.zip unzip -o RPi_Zero_PhotoPainter.zip -d RPi_Zero_PhotoPainter cd RPi_Zero_PhotoPainter/7in3_e-Paper_E
# Ensure in RPi_Zero_PhotoPainter/7in3_e-Paper_E location cd python/examples/ python3 epd_7in3e_test.py
sudo raspi-config Select Interacting Options ->I2C ->yes to start the I2C kernel driver

Then restart Raspberry Pi:
sudo reboot
wget https://files.waveshare.com/wiki/RPi_Zero_PhotoPainter/Demo/RPi_Zero_PhotoPainter.zip unzip -o RPi_Zero_PhotoPainter.zip -d RPi_Zero_PhotoPainter cd RPi_Zero_PhotoPainter/UPS python3 INA219.py
After the program runs, it will output battery voltage, current, power, and battery remaining percentage, etc.![]()
Note: If the current is negative, it indicates the battery output current (which can be considered as Raspberry Pi load current), and if the current is positive, it indicates the battery charging current.
sudo raspi-config Select Interacting Options ->I2C ->yes to start the I2C kernel driver

Then restart Raspberry Pi:
sudo reboot
#Open the Raspberry Pi terminal and run the following commands: wget https://github.com/joan2937/lg/archive/master.zip unzip master.zip cd lg-master make sudo make install # For more information, please refer to the source code: https://github.com/gpiozero/lg
#Open the Raspberry Pi terminal and run the following commands: wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz tar zxvf bcm2835-1.71.tar.gz cd bcm2835-1.71/ sudo ./configure && sudo make && sudo make check && sudo make install # For more information, please refer to the official website: http://www.airspayce.com/mikem/bcm2835/
#Open the Raspberry Pi terminal and run the following commands: sudo apt-get install wiringpi #For Raspberry Pi systems after May 2019 (those earlier may not require execution), an upgrade may be necessary: wget https://files.waveshare.com/wiki/common/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v # Run gpio -v and version 2.52 will appear. If it does not appear, there is an installation error. #Bullseye branch system uses the following command: git clone https://github.com/WiringPi/WiringPi cd WiringPi ./build gpio -v # Run gpio -v and version 2.60 will appear. If it does not appear, there is an installation error.
wget https://files.waveshare.com/wiki/RPi_Zero_PhotoPainter/Demo/RPi_Zero_PhotoPainter.zip unzip -o RPi_Zero_PhotoPainter.zip -d RPi_Zero_PhotoPainter cd RPi_Zero_PhotoPainter/RTC
cd c make clean make -j8 sudo ./main
sudo apt-get update sudo apt-get install ttf-wqy-zenhei sudo apt-get install python3-pip sudo pip3 install spidev
wget https://files.waveshare.com/wiki/RPi_Zero_PhotoPainter/Demo/RPi_Zero_PhotoPainter.zip unzip -o RPi_Zero_PhotoPainter.zip -d RPi_Zero_PhotoPainter cd RPi_Zero_PhotoPainter/RTC
cd python # Set the RTC time and loop to display time, date, and temperature sudo python3 main.py # Sync the RTC time to the system, only for systems that are not connected to the internet sudo python3 Set_system_time.py
Note: Do not connect to the Internet during this process.
Note that with this method, you can't use the demo above
Add at the end of /boot/config.txt
dtoverlay=i2c-rtc,ds3231 #Reboot Raspberry Pi sudo reboot
Synchronize system clock -> hardware clock.
sudo hwclock -w
Synchronize hardware clock -> system clock.
sudo hwclock -s
#Need to turn off the network, or disable network time synchronization, otherwise it will be changed backSet the hardware clock time:
sudo hwclock --set --date="9/8/2021 16:45:05"View the hardware clock.
sudo hwclock -r
Show version information.
sudo hwclock --verbose
sudo nmtui
The PWR pin usage is inconsistent; the PWR pin used on this PCB board is BCM number 27, and it needs to be modified in the program before reprogramming
![]()
![]()
This is a bug in the OnnxStream library, and currently, the only solution is to wait for Vito Plantamura to fix it. There is no better way to resolve it at the moment
Use the ps command to find running script processes:
ps aux | grep cron_flower.sh
You may see output similar to the following:
pi 1234 0.0 0.1 4200 1024 pts/0 S+ 10:00 0:00 /bin/bash ./cron_flower.sh pi 1235 0.0 0.0 7220 596 pts/0 S+ 10:00 0:00 sleep 600 pi 1240 0.0 0.0 6432 880 pts/1 R+ 10:01 0:00 grep --color=auto cron_flower.sh
The first line is the main process of your script, and 1 2 3 4 are the process IDs (PID).
The second line is the sleep sub-process initiated by the script.
Use the kill command to terminate the script main process:
kill 1234
Among them, 1 2 3 4 are the PIDs of the script processes you found.
After terminating the main process, the sleep subprocess will also end, and the entire script will stop.
The specific reasons are as follows:
1. The executable memory of zero is relatively small. After generating an image, the memory hasn't been released yet, and new data is written, leading to insufficient memory and causing zero to crash
2. When generating images, the temperature of zero will continue to rise. If a secondary execution is performed before the temperature starts to cool down after completion, it may lead to entering overheat protection
It is recommended to wait more than half an hour after generating an image before creating another one
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com