Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOARD_TOUCH_IRQ in utilities.h #17

Open
kc427hk opened this issue Nov 9, 2024 · 1 comment
Open

BOARD_TOUCH_IRQ in utilities.h #17

kc427hk opened this issue Nov 9, 2024 · 1 comment

Comments

@kc427hk
Copy link

kc427hk commented Nov 9, 2024

Hi all,

The file utilities.h in the example folder, the BOARD_TOUCH_IRQ is set to 7, GPIO7, but when I check the schematic, shouldn't it be GPIO21 ?

Also, anyone know how to put the device in deep sleep, and then wake up by touching the screen? How to do it properly? I have tried putting it in deep sleep, but it would wake up automatically after about 5 seconds.

Here is my code to put ESP32 into sleep:

void GoToSleepNow(void)
{
  // Erase the display.
  tft.fillScreen(TFT_BLACK);

  // LCD off.
  digitalWrite(TFT_BL, LOW);

  // Delay.
  delay(2000);

  // Enable touch sleep.
  touch.sleep();

  // Set wake up source fo the sleep mode. 
  gpio_hold_en((gpio_num_t)BOARD_TOUCH_RST);
  //gpio_deep_sleep_hold_en();
  esp_sleep_enable_ext0_wakeup((gpio_num_t)BOARD_TOUCH_IRQ, 0);
  //esp_sleep_enable_ext0_wakeup((gpio_num_t)BOARD_TOUCH_IRQ, 1);   // 1, keep sleeping and won't wake up anymore
  esp_deep_sleep_start();         
}

thanks

@lewisxhe
Copy link
Contributor

The touch terminal pin is 21, which has been updated

Touch wake-up, touch cannot be set to sleep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants