Giter VIP home page Giter VIP logo

misterjmw / e-paper-esp32-slideshow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rjgns/e-paper-esp32-slideshow

0.0 0.0 0.0 2.3 MB

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.

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?

e-paper-esp32-slideshow's People

Contributors

rjgns avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.