• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Detect long touch upon wake up from deep sleep

Q&A Forum › Category: ESP32 › Detect long touch upon wake up from deep sleep
0 Vote Up Vote Down
Jas asked 6 years ago

Hi,

I am trying to detect if the user is still touching the pin T2 after ESP32 wakes up.

touchAttachInterrupt(T2, callback, Threshold);

Since I cannot use digitalRead(T2)==LOW because this pin it is not HIGH or LOW, it is threshold based.

I would like to use the same pin for touch wakeup and when device wakes up I would like to detect that the pin is still touched for 2 seconds etc. and do something.

Any ideas?
Thanks

2 Answers
0 Vote Up Vote Down
Jas answered 6 years ago

Never mind, I found the answer, i.e. is to use callback.
 
Thanks

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Thanks for letting me know! I’m glad you were able to figure it out.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn LVGL: Build GUIs for ESP32 Projects – Version 1.5 July 7, 2025
  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.