Skip to content

Commit 78bf565

Browse files
committed
Removed Inkplate_Wake_up_on_touchpads example and added Inkplate_Wake_up_on_touchscreen
1 parent ea16989 commit 78bf565

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed
Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/*
2-
Inkplate_Wake_up_on_touchpads example for e-radionica.com Inkplate 6
2+
Inkplate_Wake_up_on_touchscreen example for e-radionica.com Inkplate 6
33
For this example you will need USB cable and an Inkplate 6
44
Select "Inkplate 6(ESP32)" from Tools -> Board menu.
55
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
66
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
77
8-
Here is shown how to use MCP and ESP interrupts to wake up the MCU from deepsleep when touchpad is pressed.
8+
Here is shown how to use MCP and ESP interrupts to wake up the MCU from deepsleep when touchscreen or wake up button
9+
is pressed.
910
1011
Want to learn more about Inkplate? Visit www.inkplate.io
1112
Looking to get support? Write on our forums: http://forum.e-radionica.com/en/
@@ -42,19 +43,29 @@ void setup()
4243
display.setIntOutput(1, false, false, HIGH);
4344
display.setIntPin(touchPadPin, RISING);
4445

46+
// Init touchscreen and power it on after init (send false as argument to put it in deep sleep right after init)
47+
if (display.tsInit(true))
48+
{
49+
Serial.println("Touchscreen init ok");
50+
}
51+
else
52+
{
53+
Serial.println("Touchscreen init fail");
54+
while (true)
55+
;
56+
}
57+
4558
++bootCount;
4659

4760
// Our function declared below
4861
displayInfo();
4962

50-
// Go to sleep for TIME_TO_SLEEP seconds, but also enable wake up from gpio 34
51-
// Gpio 34 is where the mcp interrupt is connected, check
52-
// https://github.com/e-radionicacom/Inkplate-6-hardware/blob/master/Schematics%2C%20Gerber%2C%20BOM/Inkplate6%20Schematics.pdf
53-
// for more detail
63+
// Go to sleep for TIME_TO_SLEEP seconds.
5464
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
55-
esp_sleep_enable_ext0_wakeup(GPIO_NUM_34, 1);
5665

57-
// Enable wakup from deep sleep on gpio 36
66+
// Enable wake up from deep sleep on gpio 36 (wake up button and Touch INT pin), check
67+
// https://github.com/e-radionicacom/Inkplate-6PLUS-Hardware/blob/main/Schematics%2C%20Gerber%2C%20BOM/v1.0/Inkplate%206PLUS%20Schematics%20v1.0.pdf
68+
// for more detail
5869
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, 0);
5970

6071
// Go to sleep

0 commit comments

Comments
 (0)