https://github.com/vedantparanjape/esp-epaper-display
ESP-IDF component for waveshare epaper displays
https://github.com/vedantparanjape/esp-epaper-display
c embedded epaper-displays esp-idf esp32 waveshare
Last synced: about 1 year ago
JSON representation
ESP-IDF component for waveshare epaper displays
- Host: GitHub
- URL: https://github.com/vedantparanjape/esp-epaper-display
- Owner: VedantParanjape
- License: other
- Created: 2020-09-16T11:53:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-04T16:08:39.000Z (over 1 year ago)
- Last Synced: 2025-03-24T16:52:05.316Z (about 1 year ago)
- Topics: c, embedded, epaper-displays, esp-idf, esp32, waveshare
- Language: C
- Homepage:
- Size: 8.19 MB
- Stars: 27
- Watchers: 2
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ESP-IDF component for Waveshare epaper displays
Report Bug
·
Request Feature
·
Send a Pull Request
# ESP32 Epaper Display component
ESP-IDF Component for driving waveshare's epaper displays. This is a port of Waveshare's official code for driving epaper display.
* [ ] [1.02" D module](https://www.waveshare.com/wiki/1.02inch_e-paper_Module)
* [x] [1.54" V2 module](https://www.waveshare.com/wiki/1.54inch_e-Paper_Module)
* [ ] [1.54" B module](https://www.waveshare.com/wiki/1.54inch_e-Paper_Module_(B))
* [ ] [1.54" C module](https://www.waveshare.com/wiki/1.54inch_e-Paper_Module_(C))
* [ ] [2.13" V2 module](https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT)
* [ ] [2.13" B module](https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT_(B))
* [ ] [2.13" C module](https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT_(C))
* [x] [2.13" D module](https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT_(D))
* [x] [2.66" module](https://www.waveshare.com/wiki/2.66inch_e-Paper_Module)
* [x] [2.7" module](https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT)
* [ ] [2.7" B module](https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT_(B))
## Installation
```
cd
mkdir components
cd components
git clone https://github.com/VedantParanjape/esp-epaper-display.git epaper
```
Change CMakeList.txt to add the line given below:
`set(EXTRA_COMPONENT_DIRS )`
component folder must contain `epaper` component
## Configuration
Set the pins used and appropriate display module used in menuconfig
```bash
idf.py menuconfig
```
Setting present at: `Component config --> E-Paper display configuration`
#### Pin setting
Path: `Component config --> E-Paper display configuration`

#### Display model setting
Path: `Component config --> E-Paper display configuration --> Display Type`

## Example code
Example app: https://github.com/VedantParanjape/esp-component-examples/tree/master/esp-epaper-example
```c
#include "epaper.h"
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/timer.h"
#define COLORED 0
#define UNCOLORED 1
extern "C" void app_main()
{
Epd epd;
unsigned char* frame_ = (unsigned char*)malloc(epd.width * epd.height / 8);
Paint paint_(frame_, epd.width, epd.height);
paint_.Clear(UNCOLORED);
ESP_LOGI("EPD", "e-Paper init and clear");
epd.LDirInit();
epd.Clear();
vTaskDelay(2000);
int d = 3;
for (char i = '0'; i <= '9'; i++)
{
paint_.DrawCharAt(d, d, i, &Font20, COLORED);
epd.DisplayPart(frame_);
vTaskDelay(100);
d = d + 20;
}
epd.Sleep();
}
```
# Credits
* Thanks to [ayoy](https://github.com/ayoy), Adapted the code for other display models using this [project](https://github.com/ayoy/esp32-waveshare-epd).
* Thanks to waveshare for sharing [arduino codes](https://github.com/waveshare/e-Paper/tree/master/Arduino) for epaper displays.