Skip to content

Commit 1d567dc

Browse files
authored
[UPD] README.md
1 parent d339366 commit 1d567dc

File tree

1 file changed

+56
-15
lines changed

1 file changed

+56
-15
lines changed

README.md

Lines changed: 56 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,23 @@ Designed to support a wide range of ePaper displays from **WaveShare** and **Goo
1717

1818
* MCU: ESP32-C3-WROOM-02-H4
1919
* Power supply: [Egg_LDO_1000](https://github.com/Plaenkler/Egg_LDO_1000)
20-
* Connectivity: I2C, UART over USB, UART
20+
* Connectivity: SPI, UART/USB, 24-pin FPC ePaper connection
2121

2222
## ⚡ Circuit Diagram
2323

24-
Coming soon...
24+
![gulu_circuit diagram](https://github.com/Plaenkler/Gulu_ESP32-C3_ePaper/assets/60503970/1ba6de68-8dc7-44b1-94b2-039d5cceef62)
2525

26-
## Software capabilities
26+
## Power consumption
2727

28-
Coming soon...
28+
The power consumption in deep sleep mode of the ESP32-C3 was measured using the [Power Profiler Kit II](https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2) from Nordic Semiconductor.
29+
The example firmware in this project was used as a benchmark.
30+
A daughter board such as the [Egg_LDO_1000](https://github.com/Plaenkler/Egg_LDO_1000) was not used, and VOUT and GND of the kit were connected directly to the corresponding pads.
31+
During the measurement, a 7.5 inch black and white display ([WFT0583CZ61](https://www.good-display.com/product/396.html)) from [Good Display](https://www.good-display.com) was connected to the FPC port.
32+
The duration of the measurement in this case was one minute after the first cycle of the firmware, which resulted in an average current of **~35μA**.
33+
When the display is not connected, the current is approximately **~10μA** in deep sleep mode.
2934

30-
## Board and connections
35+
![One_minute_deep_sleep](https://github.com/Plaenkler/Gulu_ESP32-C3_ePaper/assets/60503970/87c6e501-ffcb-41a7-be25-fa08fab55342)
3136

32-
Coming soon...
3337

3438
## Arduino compatibility
3539

@@ -52,16 +56,53 @@ static const uint8_t SCK = 5; // EPD_SCK
5256

5357
## Firmware example
5458

55-
Coming soon...
59+
### Display Definition and Image
5660

57-
## Power consumption
61+
This section contains a header file with a definition for the display and a sample image.
62+
The display is initialized with the required pins specified for the GxEPD2 library.
63+
Additionally, a sample image is defined as an array of byte data stored in PROGMEM (program memory) of the microcontroller.
5864

59-
The power consumption in deep sleep mode of the ESP32-C3 was measured using the [Power Profiler Kit II](https://www.nordicsemi.com/Products/Development-hardware/Power-Profiler-Kit-2) from Nordic Semiconductor.
60-
The example firmware in this project was used as a benchmark.
61-
A daughter board such as the [Egg_LDO_1000](https://github.com/Plaenkler/Egg_LDO_1000) was not used, and VOUT and GND of the kit were connected directly to the corresponding pads.
62-
During the measurement, a 7.5 inch black and white display ([WFT0583CZ61](https://www.good-display.com/product/396.html)) from [Good Display](https://www.good-display.com) was connected to the FPC port.
63-
The duration of the measurement in this case was one minute after the first cycle of the firmware, which resulted in an average current of **~35μA**.
64-
When the display is not connected, the current is approximately **~10μA** in deep sleep mode.
65+
```cpp
66+
#ifndef _750_T7_H_
67+
#define _750_T7_H_
6568

66-
![One_minute_deep_sleep](https://github.com/Plaenkler/Gulu_ESP32-C3_ePaper/assets/60503970/87c6e501-ffcb-41a7-be25-fa08fab55342)
69+
#include <GxEPD2_BW.h>
70+
71+
GxEPD2_BW<GxEPD2_750_T7, GxEPD2_750_T7::HEIGHT> display(
72+
GxEPD2_750_T7(6, 7, 10, 3)
73+
);
74+
75+
const unsigned char image[] PROGMEM = {
76+
0x55, 0x55, 0x55, 0x6d, 0xb6, 0xdb, 0x6d, 0xb5, 0x6a, 0xbf, 0xf5, 0x22, ...
77+
```
78+
79+
### Main Program
80+
81+
The first section initializes the necessary components for the firmware.
82+
Firstly, the onboard LED (connected to pin 0) is configured as an output.
83+
Then, the display initialization is called.
6784
85+
```cpp
86+
#include "750_T7.h"
87+
88+
void setup() {
89+
pinMode(0, OUTPUT);
90+
display.init();
91+
}
92+
```
93+
94+
In the main part of the program, the sample picture is displayed on the screen, after which the screen is switched to hibernation mode.
95+
Subsequently, the onboard LED is turned on for one second and then turned off.
96+
After that, a timer wakeup for the deep sleep mode is enabled, and the microcontroller is put into deep sleep.
97+
98+
```cpp
99+
void loop() {
100+
display.drawImage(image, 0, 0, 800, 480);
101+
display.hibernate();
102+
digitalWrite(0, 1);
103+
delay(1e3);
104+
digitalWrite(0, 0);
105+
esp_sleep_enable_timer_wakeup(1e7);
106+
esp_deep_sleep_start();
107+
}
108+
```

0 commit comments

Comments
 (0)