This ESP32 Arduino sketch lets you write images, text, and QR-Codes to your e-paper display from a browser-based interface.
-
Draw images with very basic drawing operations and upload it to your e-paper display or save it to the ESP32's internal flash memory:
-
Enter text with very basic markdown for color, alignment, spacing, and fonts, and upload it for rendering on the e-paper display:
-
Create QR-codes for display on the e-paper display:
-
Select PNG images from your local device and save them to flash memory:
-
Manage saved images in the ESP32's flash memory (show in browser, upload to e-paper display, download to PC, delete):
Full screenshot:
- ESP32 with SPIFFS flash partition (ESP8266s might work too; ESP32 C3 tested ok)
- 3-color e-paper module (2-color might work too)
Written and to date exclusively tested for the WeAct-EpaperModule-2.13 with 250x122 pixels.
- Install these Arduino libraries: ESPAsyncWebServer; GxEPD2; PNGdec; U8g2_for_Adafruit_GFX; qrcode
- Important: the qrcode library has a naming conflict with a qr 695C code.h from the ESP32 core. Follow these instructions to solve the conflict. You will need to restart the Arduino IDE afterwards.
- Make sure you have a working SPIFFS partition on your device. Run the examples from the SPIFFS library folder if in doubt.
- Connect your e-paper to your ESP32 and make sure it works as expected by running the GxEPD2 GFX examples.
- Load the sketch and adapt the config section at the top of the source code with your e-paper configuration, Wifi credentials, and preferred fonts. Note: some newer u8g2 fonts need an updated U8g2_for_Adafruit_GFX.h, see source code for details.
- Upload the sketch to your ESP32.
- See the serial monitor for the local URL. Open that in your browser, a tablet might be nicer than a PC for drawing.
- Start playing around, most things should be self-explanatory.
- Always wait for operations to finish, the script has currently no safeguards against competing requests. Particularly saving to flash can take a bit.
- Upload = upload to e-paper; Save = save to ESP32 flash memory; Download = download from flash to local device
- Images from you local device must be in PNG format and should reflect the dimensions and orientation of your e-paper module. If they don't, you might encounter crashes. Alpha channel is ignored at the moment.
- For the PNG image upload, you can choose between two algorithms. Choose nearest for two- or three-color images. Use dithered for multicolor images and photos. Use the sliders to adjust the thresholds for brightness and redness.
- The draw on canvas comes with no undo, but you can use the save button frequently if your flash memory still has space left. Take care, though, existing files will be overwritten and saving might take a bit.
- QR-Code mode will be chosen automatically between numeric, alphanumeric, and byte depending on your input. Choose QR-code size and pixel size with care, the code will not check if the QR will fit ony your screen.
- A note on RAM: It might be that ESP32 RAM will be a natural limit for supported e-paper dimensions. I only tested my 250x122 3-color module. If things don't work as expected, watch the serial monitor for crash reports.
- This also applies for QR-code creation, up to 121x121 it worked fine for me without crashing.
(c) 2025 juh
Includes MIT licenced code by J-M-L Jackson from the Arduino Forum
I heavily extended it with e-paper uploads, QR-code upload, PNG file management and more with many code snippets elicited by my natural and fully biodegradable intelligence from the GPT 4o ai model.
Warning: The current state of this is "it works for me", not more. The result looks good to me, but the code reflects little planning and structure in the development process, it needs a lot of cleanup, streamlining, and optimization.
I haven't decided yet how much effort I will want to spend on this in the futore. So, as the license says, "provided as is"
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
Includes MIT licenced code by J-M-L Jackson, see source for their original MIT license.