Giter Site home page Giter Site logo

epd's Introduction

EPD

Porting of Waveshare official 2in9 lib for esp32 idf.

Getting Started

This library works with idf version 3.3 and 4.0 (stable version at writing time)

To get started see Espressif offical doc

How connect eink display

Signal GPIO
DIN / MOSI GPIO_NUM_23
CLK GPIO_NUM_18
CS GPIO_NUM_5
DC GPIO_NUM_26
RST GPIO_NUM_27
BUSY GPIO_NUM_32

Usage

unsigned char image[EPD_WIDTH*EPD_HEIGHT/8];
Paint paint(image, 0, 0);
Epd epd;
	
if (epd.Init(lut_partial_update) != 0) {
    ESP_LOGE(kEPDTAG, "e-Paper init failed");
    vTaskDelay(2000 / portTICK_RATE_MS);
    return;
}

epd.ClearFrameMemory(0xFF); 
epd.DisplayFrame();
epd.ClearFrameMemory(0xFF); 
epd.DisplayFrame();

paint.SetRotate(ROTATE_90);
paint.SetWidth(EPD_WIDTH);
paint.SetHeight(EPD_HEIGHT);

paint.Clear(UNCOLORED);

paint.DrawStringAt(0, 0, "e-Paper Demo F24", &Font24, COLORED);

paint.DrawStringAt(0, 28, "e-Paper Demo F20", &Font20, COLORED);

paint.DrawStringAt(0, 50, "e-Paper Demo F16", &Font16, COLORED);

paint.DrawStringAt(0, 70, "e-Paper Demo F12", &Font12, COLORED);

paint.DrawStringAt(0, 90, "e-Paper Demo F8", &Font8, COLORED);

epd.SetFrameMemory(paint.GetImage(), 0, 0, paint.GetWidth(), paint.GetHeight());

epd.DisplayFrame();

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.