cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards
https://cyberman54.github.io/ESP32-Paxcounter/
Other
1.69k stars 397 forks source link

Adding E paper display capability #756

Closed JodliDev closed 1 year ago

JodliDev commented 3 years ago

I added the GXEPD2 library and incorporated it. For now there is only the option for the TTGOv5 2.3 (because that is the board we have). But by changing src/hal/ttgov5_v2_3.h a lot of other boards can be added (see https://github.com/ZinggJM/GxEPD2 and https://github.com/ZinggJM/GxEPD2/blob/master/examples/GxEPD2_Example/GxEPD2_display_selection_new_style.h).

Also the screen does not have many options at the moment. Adapt src/e_paper_display.cpp to add capabilites.

The screen behavior is slightly different than with OLED screens, because e paper displays do not need constant updates and it takes a few seconds to update (and I didnt see any point in updating it regularly since that just wastes battery). So the screen only updates when: The IO button is pressed or the board wakes up from deep sleep.

JodliDev commented 3 years ago

I changed the source (sorry for that) and removed the irq handler for now. I can add automatic updates if you prefer, but I need to wait for a couple of days until I can test it (right now I am doing a battery test with our board).

JodliDev commented 3 years ago

Sorry for my late response. Yes, irqhandler.h does not need an include anymore. But button.h does. So I moved the include