Giter VIP home page Giter VIP logo

esp-epaper-display's Introduction


Logo

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.

Installation

cd <your_esp_idf_project>
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 <relative_path_to_component_folder>)

component folder must contain epaper component

Configuration

Set the pins used and appropriate display module used in menuconfig

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

#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, Adapted the code for other display models using this project.
  • Thanks to waveshare for sharing arduino codes for epaper displays.

esp-epaper-display's People

Contributors

isaacnez avatar kaiserdragon2 avatar keredson avatar step0035 avatar vedantparanjape avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

esp-epaper-display's Issues

Wrong SPI host

Hi there, I ran into a fault when I need to init SPI for a second time after adding some sleep/wake features

  • The issue is in line 72 of epdif.cpp
    spi_bus_free(VSPI_HOST);

  • I believe that this should be
    spi_bus_free(HSPI_HOST);
    since the HSPI host was used during bus initialization in line 100
    ret=spi_bus_initialize(HSPI_HOST, &buscfg, 0);

SPI Fails for new ESP-IDF

Hi,

First, thanks for this amazing port! It saved me a lot of headaches. For the past year, I have been using it over ESP-IDF v4.3 and v4.4.2 but I had to do some minor changes to make it run.

First, the includes for epdif.h and other alike had to be changed to epdif.cpp and similar. Likewise, I had to remove the definiton of SPI_HOST because it is now defined under spi_types.h

It would be my privilege to contribute to the project. I have already fixed them on my local branch but I lack the permissions to push it to the repo and then open a pull request.

I also plan to introduce version checking to make it more adaptable.

Let me know if you are interested!

Waveshare 2.9 inch ePaper

Add code for Waveshare 2.9 inch ePaper display module. I don't know which version I have, probably V1 (it has no version designation on it). I am hoping that I can adapt the code you already have for the 2.7 inch display. I asked Waveshare support to send me code, but you might know better how to get the code.

Missing EPD methods for 2.13 and 2.7

I see that the example provided in README cannot work with 2.13 and 2.7 inch displays in their current code.
Method LDirInit is missing from both. Method DisplayPart is missing from 2.7 implementation.

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.