Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

cale-idf

> 编程语言
Open source

CalEPD is an Epaper component driver for the ESP-IDF framework with GFX and font support, optional touch interface, compatible with ESP32 / S2 / S3 / C3

357 stars0 likes0 views
WebsiteGitHub

About

CalEPD is an Epaper component driver for the ESP-IDF framework with GFX and font support, optional touch interface, compatible with ESP32 / S2 / S3 / C3

Requirements

  • esp32 or S2 / S3 / C3 MCU versions in branch develop
  • Espressif IDF framework >= 4.2 (4.3 -> 4.4 ideally to support latest S3)
  • An epaper display (see Wiki for supported models)
  • If you want to have a Web-Service to deliver the image we built our own one. Just head to CALE.es and make an account. This video of UsefulElectronics will help you to get started.
  • Check FastJsonDL a JSON domain language to draw GFX on displays that could be sent from a webservice or from an AI agent (parallel einks but it could be easily ported here too)

If you are using raw parallel Eink displays in your project we highly recommend trying this new component FastEPD And our best selling Tindie product the epdiy v7 epaper controller.

ESP32C3 /S3 also works as a target. Please check also config-examples/C3-riscv-spi where is a PIN configuration that is prove to be working. Then just select one of the SPI examples, and do a: idf.py set-target esp32c3

idf.py --preview set-target esp32s3 (Only v4.4 since tried this only with beta3)

Cale-idf is the official ESP-IDF firmware of our Web-Service CALE.es and also the repository where the development of CalEPD epaper component takes place. The main class extends Adafruit GFX so this library has full geometric functions and also fonts including German/Spanish/French special characters support.

VSCODE and Platformio

In the repository cale-platformio you can have a quick start skeleton to use CalEPD and Adafruit-GFX components, along with optional FocalTech touch I2C. Please be aware that there are some corrections to do by hand until we figure out what is the best way to do it. Read those in the WiKi and please give a ★ to the cale-platformio repository if you find it useful

News

  • We are working in a interesting new PCB design to make a smart switch using this component. If you are interested please check our repository Bistable-smart-Switch and don't be shy, give it a ★ if you like it.

  • A full pfleged version that supports WiFi provisioning using ESP-Rainmaker app is updated on the branch feature/50-idf-v5-rainmaker Note: It needs an external submodule component so don't forget to run:

    git submodule update --init --recursive

For more news and announcements please check the Wiki section

Excluding components / parallel epapers

Please note that parallel driver epdiy is not anymore a requirement and after last update epdiy V6 is not part of this repository, only linked as a git submodule. So in case you want to use our experimental implementation in C++, please pull the git submodules:

bash
git submodule update --init --recursive

Also please notice that if you need to exclude any of the components, like for example epdiy or any other, the fastest and most straigh-forward way is to open the CMakeLists of that component and add as the first line:

return()

That will make this component not to get in the build process. If you are not using EPDiy to drive your epapers, this step is not needed. If you are, please go to: CalEPD/CMakeLists.txt

And enable epdiy in the REQUIRE section and the related classes:

# Uncomment for parallel epapers:
"epdParallel.cpp"
"models/parallel/ED047TC1.cpp"
"models/parallel/ED047TC1touch.cpp"
"models/parallel/ED060SC4.cpp"
# Add more if you need to copying one of the existing, since not all eink sizes are supported

Additional features

CalEPD has also support for FocalTech and L58 I2C touch panels used in Lilygo parallel epaper EPD047, enabling you to make simple UX interfaces using small epaper displays. This is optional and can be enabled only when the Firmware requires touch. Please check the Wiki for latest news and to see what displays are supported. The Wiki is the perfect place to make updates that are not branch dependant so our documentation efforts will be focused there. CalEPD supports currently the most popular epaper sizes and four color models (4.2, 5.83, 7.5 and 12.48 inches).

  • Use develop to try the latest features. Only after days or even weeks of testing, it will be merged in master, and eventually land in a new CalEPD epaper component release
  • If you are interested in LVGL / UX please check our project lv_port_esp32-epaper. In this experimental LVGL esp32 fork we are exploring the possibility to make UX in fast paralell displays.

Parallel epapers need to have an EPDiy board or a Lilygo T5-4.7 inches epaper.

Fork policy

Please do not Fork this repository to bookmark it. For that use the ★ Star button. Acceptable forks fall in this three categories:

  1. You found a bug and want to suggest a merge request. Then Fork it!
  2. You will contribute adding a new epaper model that does not exist or add a new functionality to an existing one.
  3. You will use Cale-idf as a base to create something new. But in that case it would be better to fork the components.

This advice is because we don't like having copies of the whole repository without any reason. But it does not interfere in any way with the Apache License that clearly states that you might reproduce and distribute a copy of this component provided you agree with the terms mentioned there.

Requesting for new models

If your epaper model is not there just open an Issue and send us one epaper with the SPI interface. If we can make a working implementation and new C++ class then you can use it in your Firmware and we keep the eink as a payment for our effort. If we fail and cannot make a working implementation then it comes back to you at no cost. Also following existing classes you can do it yourself. Just check on the pull requests to see how other developers did to add their epapers!

CALE Firmware

CALE does only 3 things at the moment and is very easy to set up:

  1. It connects to cale.es and downloads a Screen bitmap.
  2. In "Streaming mode" it pushes the pixels to Adafruit GFX buffer and at the end renders it in your Epaper.
  3. It goes to sleep the amount of minutes you define in the ESP-IDF menuconfig

It wakes up after this deepsleep and goes back to point 1 making it an ideal Firmware if you want to refresh an Events calendar or weather Forecast display. It does not need to be tied to our CALE service. You can use your own full url to your bitmap image. We just recommend to use CALE.es since you can easily connect it to external APIs and have a living epaper. Optionally you can do the same, but with a JPG, using our www-jpg-render example. Please note that in many cases you will require an ESP32-Wrover or similar with PSRAM.

Different cpp examples:

  • cale.cpp Main example to use with monochrome or 3 color epapers from Goodisplay/Waveshare
  • cale-grayscale.cpp Example only to use with PlasticLogic epapers, serves as footprint to do it with other models
  • cale-sensor.cpp Same as cale.cpp but it has a sensor interrupt when a GPIO goes HIGH (Rising) this triggers a new image request
  • cale-7-color.cpp Example to retrieve an 4 bits image and send it with up to 7 colors the 5.65 Acep epaper

Best settings on CALE.es website that we found to display color photos with cale-7-color is to use Dither mode: 3x3 and Bits per pixel: 24. This is downgraded to 4bpp using dithering but that's really ok since 16 colors are more than the epaper supports. It's not a great photo quality but this epapers where designed to make labels and supermarket prices, not to display quality color pictures.

ROADMAP

2023.Still adding some Goodisplay epapers. Introduction of setMonoMode (to add 4 gray mode in certain models)
2022.Performance optimization and research in parallel eink drivers
2021.Oct→Dec Testing other projects and small pause (Lot's of other work that are not electronics related...)
2021.Aug→Oct Imaging libraries: Adding JPG support and optimizing processes
2021.Jun→Aug Parallel interaction research: UX on epaper displays
2021.Mar till June Enabling touch support to enable UX design in ESP32
2020.Sep Optimizing instantiation and configuration
2020.Aug Adding color epapers 5.83 and 7.5 inches
2020.Jul Added PlasticLogic as a new brand with 4 wire SPI (uses MISO)

CALE-IDF uses this components:

  • CalEPD the epaper component
  • Adafruit GFX for ESP-IDF My own fork of Adafruit display library
  • EPDiy it's our own fork of the parallel epaper component EPDiy with only the directory structure to use it as an IDF component

They are at the moment included without git submodules so we can develop fast without updating them all the time. But they are also available to be used as your project ESP-IDF components.

Configuration

Make sure to set the GPIOs that are connected from the Epaper to your ESP32. Data in in your epaper (DIN) should be connected to MOSI:

And then set the image configuration and deepsleep minutes. Here you can also set the rotation for your Eink display:

Optionally if you use touch, for example with 2.7 inches gdew027w3-T epaper, you should configure also FT6X36 Gpios:

Needs 3.3v, a common GND, SDA, SCL for I2C communication, and a input INT pin that signalizes on Low that there is touch data ready.

CalEPD component

CalEPD is an ESP-IDF component to drive epaper displays with ESP32 / ESP32S2 and it's what is sending the graphics buffer to your epaper behind the scenes. It's designed to be a light C++ component to have a small memory footprint and run as fast as posible, leaving as much memory as possible for your program. Note that the pixels buffer, takes 1 byte to store 8 pixels on each color, so depending on your epaper size may need external PSRAM. Up to 800 * 480 pixels on a monochrome eink it runs stable and there is still free DRAM for more.

Branches

master... -> stable version (ChangeLog moved to Wiki)

refactor/oop -> Making the components base, most actual branch, where new models are added. Only after successfull testing they will be merged in master. Inestable branch do not use on Firmware that you ship to a client.

tft_test -> Original SPI master example from ESP-IDF 4 just refactored as a C++ class. Will be kept for historic reasons

Epaper demos

Open the /main/CMakeLists.txt file to select what is the C++ file that will be compiled as your main program. Just uncomment one of the SRCS lines:

idf_component_register(
  # Main CALE 
  #SRCS "cale.cpp" -> CALE Firmware for IDF
   SRCS "demo-fonts.cpp"
  #SRCS "demo-epaper.cpp"
  INCLUDE_DIRS ".")

This configuration will just compile the Fonts demo to test your epaper display. Use cale.cpp if you are looking forward to compile our [CALE Firmware]

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ceinkepaperesp-idfesp32

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言