Skip to content

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

Notifications You must be signed in to change notification settings

RJGns/E-Paper-ESP32-slideshow

Repository files navigation

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.

Set-up

Applying dithering and re-scaling or use didder

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)

image

Change the resolution to match your panel

image

Colour Palette Menu -> Load Colour Table

image

Go to the Colour Table folder included, Colour Tables -> (Choose the one most suitable for your display)

image

Save, then upload to any GIF -> JPEG converter

This one will do

Done! For now...

Converting into HEX

Put the converted file into the folder: Tools and Links -> ImageToEPaperConverter

image

Rename to picture.jpeg (Has to be .jpeg, not .jpg)

image

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.

image

Go up one folder, then open a terminal there (click on the directory bar and type cmd)

image

Run the command node standalone, if it went successfully should look like the following:

image
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.

image -> image

In the Arduino IDE (linked at bottom), go to the tab Sketch -> Add file, then add the .cpp file you just made.

image 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.

image ->
image

Then in the ImagesData .h tab, add extern const unsigned char (YourPictureName)[];

image

Configuring to your liking

In the main tab, highlight REPLACE_WITH_YOUR_DISPLAY (anywhere in the code) and press CRTL-F or CMD-F

image

In the "Replace with:" box add your display code, then press "Replace All"

image

Change {Arduino,ShrekImg,UnionJack} to the names of your pictures as in this, seperated by a comma

image

Change NumberOfImages to the number of images you want to cycle through

image

Change NextSlideDelay to the amount of time inbetween slides, in seconds

image

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?

About

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.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published