Code Monkey home page Code Monkey logo

heltec-eink-modules's People

Contributors

todd-herbert avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

heltec-eink-modules's Issues

Heltec 1.54" V2 display incompatible/wrong resolution

I'm trying to use this library for my 1.54" V2 display, but when running the examples it all looks from. After playing around for a bit, I found that my display has a resolution of 152x152 and not 200x200, as stated here: https://heltec.org/project/154-e-ink/.

After I changed the resolution in the code, the display seems to work with the "fast_mode" example, but only some of it. All other examples still produce "scan line" looking things, and some display updates still produce garbage. I also got some weird lines on the right side of the display.

Right now, I'm a bit confused as why the resolution in the code is set to 200x200, when the specs say 152x152. Even the AliExpress listing I bought my display from claims it to be 200x200.

This library (https://github.com/HelTecAutomation/e-ink) does work with my display, however it is very poorly documented, and I would much rather use this library instead.

// EDIT
Seems like Heltec added support for this new screen here.

Compiling

Hello,

When I try to compile the e-ink module (Wireless Paper with LCMEN2R13EFC1 display), I always get the compile error message :

/Users/B/Documents/Arduino/libraries/heltec-eink-modules/src/Platforms/WirelessPaper/power_controls.cpp: In function 'void Platform::prepareToSleep()':
/Users/B/Documents/Arduino/libraries/heltec-eink-modules/src/Platforms/WirelessPaper/power_controls.cpp:81:9: error: 'gpio_hold_en' was not declared in this scope; did you mean 'gpio_mode_t'?
81 | gpio_hold_en((gpio_num_t) PIN_LORA_NSS); // "stay where you're told"
| ^~~~~~~~~~~~
| gpio_mode_t

Is there a way to solve this ?

SPI pins not configurable for ESP32

did not see where to configure CLK or SDI.

This is a good note, thank you.
With Arduino UNO, the SPI pins are fixed. Because of this, there has so far been no option for user to specify CLK and SDI pins.
I will look into adding this as a configuration option for ESP32.

Originally posted by @todd-herbert in #4 (comment)

"Fast Mode" and clearing

I have a Heltec 1.54" V2 (BW) that seems to work properly with the fonts example if DEPG0150BNS810 is defined on an Arduino Mega 2560. But for some reason fastmodeOn seems to have the exact opposite effect. Meaning for a proper full clear I have to do:

  DRAW(display) {
    display.fastmodeOn();
    display.clear();
  }
  delay(1000);

Then the display clears the entire contents without ghosting.

  1. Is this a display (driver) quirk or nuance of this library's clear()?

So the resulting minimal working code looks like this:

void setup() {
  display.setRotation(PINS_RIGHT);
  display.setFont(&FreeSerifBold12pt7b);
  display.setDefaultColor(WHITE);
  display.setTextColor(BLACK);

  DRAW(display) {
    display.fastmodeOn();
    display.clear();
  }
  delay(2000);
}

void loop() {
  DRAW(display) {
    display.fastmodeOn();
    display.clear();
  }
  delay(2000);

  DRAW(display) {
    display.fastmodeOff();
    display.setCursor(5, 25);
    display.print(millis());
  }
  delay(5000);
}

If I merge the two DRAWs in the loop text starts overlapping (seems to do a partial update only). If I don't do fastmodeOn() in the first DRAW there's always slight ghosting. If I don't do fastmodeOff() in the second block, it displays the previous value and then (with ghosting) the new value on a previously fully cleared display.

What I'm getting at is that I'd expect this to work (draw the new text once in a while without ghosting), but it doesn't:

void setup() {
  display.setRotation(PINS_RIGHT);
  display.setFont(&FreeSerifBold12pt7b);
  display.setDefaultColor(WHITE);
  display.setTextColor(BLACK);

  display.fastmodeOff();
  display.clear();
  delay(2000);
}

void loop() {
  DRAW(display) {
    display.clear();
    display.setCursor(5, 25);
    display.print(millis());
  }
  delay(5000);
}

What wrong assumptions am I making about the display or the library?

ESP8266: can't get Black to show.

ESP8266: D1 mini
display: DEPG0213RWS800

I can't get the colors to function like expected. Black and Red both give me a red color.

I've recorded a refresh where it looks like the circles are drawn at different stages.
At the beginning of the refresh, it draws a black rectangle around the display, so i don't think my screen is broken. but: I don't have a Arduino to verify this.

e-ink_refresh.mp4

Code:

#include "heltec-eink-modules.h"
#define PIN_BUSY    5
#define PIN_CS      4
#define PIN_DC      2
DEPG0213RWS800 display( PIN_DC, PIN_CS, PIN_BUSY );      // 2.13" V2 - BWR - Red Tab
void setup() {
  DRAW (display) {
    display.fillCircle(75,50,50,BLACK);
    display.fillCircle(75,200,50,RED);
  }
}
void loop() {}

EDIT: I've rewritten the issue. Now only black is broken. The display.overwrite() call doesn't seem to be supported with v3.0.0.

ESP8266/ESP32 Support

ESP32 Boards: Xiao ESP32C3, Lolin S2 Mini,
ESP8266 Boards: Adafruit Huzzah 8266, Wemos D1 Mini Pro

Issue: Compiling failure for ESP32/8266 platforms, all boards.

Software:
Arduino SDK 2.1.1
CLI 0.32.3
ESP32 Core: 2.0.10
ESP8266 Core: 3.1.2
heltec-eink-modules: 2.4.1

Steps taken: removed & re-installed esp32/esp8266 cores & library. Tried several boards with same error.

Error:

`/Users/kritch/Documents/Arduino/libraries/heltec-eink-modules/src/Displays/DEPG0150BNS810/paging.cpp: In member function 'bool DEPG0150BNS810::calculating()':
/Users/kritch/Documents/Arduino/libraries/heltec-eink-modules/src/Displays/DEPG0150BNS810/paging.cpp:139:72: error: no matching function for call to 'min(int, uint8_t&)'
         page_bottom = min(page_top + pagefile_height - 1, winrot_bottom);
                                                                        ^
In file included from /Users/kritch/Library/Arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/include/c++/8.4.0/algorithm:62,
                 from /Users/kritch/Library/Arduino15/packages/esp32/hardware/esp32/2.0.9/cores/esp32/Arduino.h:172,
                 from /Users/kritch/Documents/Arduino/libraries/heltec-eink-modules/src/Displays/DEPG0150BNS810/DEPG0150BNS810.h:1,
                 from /Users/kritch/Documents/Arduino/libraries/heltec-eink-modules/src/Displays/DEPG0150BNS810/paging.cpp:1:
/Users/kritch/Library/Arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3456:5: note: candidate: 'template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^~~
/Users/kritch/Library/Arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0/riscv32-esp-elf/include/c++/8.4.0/bits/stl_algo.h:3456:5: note:   template argument deduction/substitution failed:
/Users/kritch/Documents/Arduino/libraries/heltec-eink-modules/src/Displays/DEPG0150BNS810/paging.cpp:139:72: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
         page_bottom = min(page_top + pagefile_height - 1, winrot_bottom);`

Driver code for Wireless Paper LCMEN2R13EFC1 module eink display.

Hi, thanks for your work. I have found the wireless paper module LCMEN2R13EFC1 eink display driver command, actually it's for the HINK-E0213A162-FPC-A0 eink display.
The sample code is use the epd2in13bc-demo.ino file in this address: https://www.waveshare.net/w/upload/d/d5/E-Paper_ESP8266_Driver_Board_Code.7z And need to do some small hack. Just delete the 0x61 Reg cmd and data, which is set the RESOLUTION_SETTING. If add this register config, the eink display will not respond to the code, which is confusing...

And the total init func is like this:

/******************************************************************************
function :	Initialize the e-Paper register
parameter:
******************************************************************************/
void EPD_2IN13BC_Init(void)
{
    EPD_2IN13BC_Reset();

    EPD_2IN13BC_SendCommand(0x06); // BOOSTER_SOFT_START
    EPD_2IN13BC_SendData(0x17);
    EPD_2IN13BC_SendData(0x17);
    EPD_2IN13BC_SendData(0x17);
	
    EPD_2IN13BC_SendCommand(0x04); // POWER_ON
    EPD_2IN13BC_ReadBusy();
	
    EPD_2IN13BC_SendCommand(0x00); // PANEL_SETTING
    EPD_2IN13BC_SendData(0x8F);  // origin code
    // EPD_2IN13BC_SendData(0x0F);
    // EPD_2IN13BC_SendData(0x09);
	
    EPD_2IN13BC_SendCommand(0x50); // VCOM_AND_DATA_INTERVAL_SETTING
    EPD_2IN13BC_SendData(0xF0);  // origin code is 0xF0
    // EPD_2IN13BC_SendCommand(0x61); // RESOLUTION_SETTING
    // EPD_2IN13BC_SendData(EPD_2IN13BC_WIDTH); // width: 104
    // EPD_2IN13BC_SendData(EPD_2IN13BC_HEIGHT >> 8); // height: 212
    // EPD_2IN13BC_SendData(EPD_2IN13BC_HEIGHT & 0xFF);
}

Other functions don't need to modify, and works out of box.

Refreshing the display in fast mode.

Totally new to the epaper display world.
I am running an instrumentation display, ESP32 and DEPG0290BNS75A.
The full display area is updated in fast mode every 10 seconds.

Would this snippet be enough to refresh the display? refreshNeeded is set to several minutes, maybe 10.

if (millis() - lastRefresh > refreshNeeded)
{
   display.fastmodeOff();
   display.update();
   display.fastmodeOn();
   lastRefresh = millis();
}

When I test this it still looks good after a day, no visible ghosting.

HELTEC 2.90" V2 - Multiple incompatible versions circulating

It has come to my attention that "not all displays are created equal". A new batch of 2.90" Black and White displays appears to have a different panel which is not currently supported by this library. This will be investigated in the near future.

Partial refresh inbetween deep sleeps

First of all, thank you so much for this project! It turned e-waste into something usable..

I have a specific problem that I tried in various ways to approach but none seem to work. I'm trying to code a clock with an esp32 that updates the time on the e-paper display after every minute and then goes to deep sleep for the rest of the time. The idea is to do a full update every full hour and the rest of the time should be partial (or fast-)updates.

The GxEPD2 library allows to skip the initial refresh of the display when initializing. I can't find anything similar here. I basically tried the "fast_mode" example but added a deep sleep command like this:

void setup() {
    display.setTextSize(2);
    display.fastmodeOn();

    display.setCursor(0, f.bottom() - 30);
    display.println("Fastmode:");
    display.println("On");
    display.update();

    display.setTextColor(WHITE);
    display.setWindow( f.left(), f.top(), f.width(), f.height() - 35 ); // Don't overwrite the bottom 35px

    for (int demo = 0; demo <= 5; demo++) { // Count up to 5
      display.drawXBitmap(ICON_L, ICON_T, hourglasses[demo % 3], hourglass_1_width, hourglass_1_height, BLACK);
      display.fillRect(0, 0, 30, 30, BLACK);
      display.setCursor(10, 10);
      display.print(demo);
      display.update();
    }
    display.fastmodeOff();

    esp_sleep_enable_timer_wakeup(2*1000000ULL);
    esp_deep_sleep_start();
}

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.