Skip to content

Building epdiy using Arduino IDE

Martin F edited this page Mar 13, 2024 · 10 revisions

Adding epdiy as an Arduino library

Please use the default branch of the repository: main

Add it as a library navigating to that folder, in mine since I use Linux, is the following:

/home/martin/Arduino/libraries (Depending on your OS this can be different)

There entering by command line, clone the repository:

cd /home/martin/Arduino/libraries
git clone https://github.com/vroland/epdiy.git

That's it! Restarting the Arduino IDE you should already have the epdiy library installed and you should see examples.

Board and Config settings:

  1. Make sure you have the latest board updates from Espressif. Just open Boards Manager and search "Espressif". Then update to the latest version of ESP32 by Espressif Systems (At the time of writing this: 2.0.11)
  2. If you are using the latest epdiy v7 then you need to use ESP32S3 with PSRAM. And also an additional important setting: Tools -> PSRAM -> OPI PSRAM
  3. Board selection: ESP32S3 Dev Module worked just fine for me

Updating the cache line size to 64 bytes

No need to read this since does not work. But I leave it since it was my 1st attempt. Arduino uses pre-compiled libraries so updating a config text file won't do it.

 cd .arduino15/packages/esp32/hardware/esp32/2.0.11/tools/sdk/esp32s3/

Attempt to add this to the sdkconfig editing the file and adding manually in the sdkconfig file:

# Comment this line
#CONFIG_ESP32S3_DATA_CACHE_LINE_32B=y 
CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y
CONFIG_ESP32S3_DATA_CACHE_LINE_SIZE=64

Sadly even trying to set this data cache line size this is not working correctly for Arduino IDE.

Temporary solution:

Downgrade the speed on src/displays.c for the displays you are using. Example:

const EpdDisplay_t ED097TC2 = {
    .width = 1200,
    .height = 825,
    .bus_width = 8,
    .bus_speed = 22, // 16 works with data cache lines 32 bytes (Arduino IDE)
    .default_waveform = &epdiy_ED097TC2,
    .display_type = DISPLAY_TYPE_ED097TC2,
};

This display works super fast using 22 Mhz parallel bus_speed in ESP-IDF v5. But will only work at 16 Mhz using Arduino IDE latest esp32 package.

Related searches to solve this issue

esp-32 forum how to use menuconfig in Arduino More info in this Espressif IDF github Issue

According to https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#esp32-wi-fi-throughput some modifications should be made in sdkconfig in order to optimize wifi settings for better throughput. As I have understood, majority of these configurations cannot be changed for the Arduino IDE. If I am not mistaken, the only way is to change the configurations in esp-idf, recompile the libraries with updated settings, and afterwards replace libraries in Arduino with new ones. I will try and let you know.