From 2b3d2b47c850a84c2664c8bbd3a37ca058a0d85d Mon Sep 17 00:00:00 2001 From: Tim Strasser Date: Sun, 6 Feb 2022 16:53:12 +0100 Subject: [PATCH] Fix for issue #65 --- TFT_eSPI/examples/FactoryTest/FactoryTest.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TFT_eSPI/examples/FactoryTest/FactoryTest.ino b/TFT_eSPI/examples/FactoryTest/FactoryTest.ino index 35d0ec7..204aa54 100644 --- a/TFT_eSPI/examples/FactoryTest/FactoryTest.ino +++ b/TFT_eSPI/examples/FactoryTest/FactoryTest.ino @@ -6,6 +6,8 @@ #include "esp_adc_cal.h" #include "bmp.h" +#include "driver/rtc_io.h" + // TFT Pins has been set in the TFT_eSPI library in the User Setup file TTGO_T_Display.h // #define TFT_MOSI 19 @@ -109,6 +111,10 @@ void button_init() //After using light sleep, you need to disable timer wake, because here use external IO port to wake up esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_TIMER); // esp_sleep_enable_ext1_wakeup(GPIO_SEL_35, ESP_EXT1_WAKEUP_ALL_LOW); + rtc_gpio_init(GPIO_NUM_14); + rtc_gpio_set_direction(GPIO_NUM_14, RTC_GPIO_MODE_OUTPUT_ONLY); + rtc_gpio_set_level(GPIO_NUM_14, 1); + delay(500); esp_sleep_enable_ext0_wakeup(GPIO_NUM_35, 0); delay(200); esp_deep_sleep_start();