Cycles through images stored on a ESP32 microcontroller. Uses a Waveshare ESP32 driver board to drive a SPI E-Paper display. Completely configurable and fairly lightweight. Can do many images, comes with three for examples. Makes a cool digital photo frame.
License: MIT License
JavaScript 0.19%C++ 31.10%C 67.58%Java 1.13%
e-paper-esp32-slideshow's Introduction
E-Paper-ESP32-slideshow
A simple Arduino program to cycle through images over SPI on an ESP32 microcontroller. Uses an E-paper display and ESP32 E-paper driver board from Waveshare. This project will only work with this board as it uses libraries from Waveshare to function. Based on a modified example from Waveshare. Also includes a JPEG to HEX converter specifically for this product line. Converter was not made by me, credit goes to WhiteRabbit.
This will likely only work with the board I am using.
Didder example command (B/W) didder -i "*.jpg" -o "M:\Media\Downloads" --palette "black white" --recolor "black white" -x 648 -y 480 -s 80% -g edm --serpentine FloydSteinberg
This requires Adobe Photoshop. Other imaging editing tools will probably work, it's just what I used. All it's needed for is to change the resolution to your screen size and set the colour table for dithering purposes.
Import image, then File -> Export -> Save for Web (Legacy)
Change the resolution to match your panel
Colour Palette Menu -> Load Colour Table
Go to the Colour Table folder included, Colour Tables -> (Choose the one most suitable for your display)
Put the converted file into the folder: Tools and Links -> ImageToEPaperConverter
Rename to picture.jpeg (Has to be .jpeg, not .jpg)
In the Options folder, edit the default.json file to fit your screen (notepad will do for this). you should only need to do this once.
Go up one folder, then open a terminal there (click on the directory bar and type cmd)
Run the command node standalone, if it went successfully should look like the following:
If there is an error check picture file name is picture.jpeg, or ask around.
In the output folder, grab the ImagesData.cpp file and move it to the (root directory) -> Images - Processed -> HEX. Rename if you like.
->
In the Arduino IDE (linked at bottom), go to the tab Sketch -> Add file, then add the .cpp file you just made.
It should appear as a tab.
In the picture.cpp (or whatever you called it) tab, change the Picture in const unsigned char Picture[] to something that makes sense.
->
Then in the ImagesData .h tab, add extern const unsigned char (YourPictureName)[];
Configuring to your liking
In the main tab, highlight REPLACE_WITH_YOUR_DISPLAY (anywhere in the code) and press CRTL-F or CMD-F
In the "Replace with:" box add your display code, then press "Replace All"
Change {Arduino,ShrekImg,UnionJack} to the names of your pictures as in this, seperated by a comma
Change NumberOfImages to the number of images you want to cycle through
Change NextSlideDelay to the amount of time inbetween slides, in seconds
Done!
Troubleshooting
If error is something about #include "DEV_Config.h" does not exist or something
Import needed libraries from Waveshare
or add E-Paper-ESP32-slideshow\Tools and Links\E-Paper_ESP32_Driver_Board_Code\examples\esp32-waveshare-epd to (YOUR_ARDUINO_SKETCHBOOK_DIRECTORY)/libraries
Image doesn't look right
Try a differnet display code
Flick the number 2 DIP switch on your board to the other position
Re-do photoshop steps, maybe you set the wrong resolution
I have a colour display, but this isn't colour
Make sure you used the right colour table in the Photoshop steps
I don't have a colour display to test to see if that works, are you sure you bought a colour display?