Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

touchAttachInterrupt fail on ESP32-S3-WROOM #6987

Unanswered
Plombir18 asked this question in Q&A
Discussion options

Hi guys,

the touch interrupt event never occurs in my code. I am using VS code with PlatformIO and Arduino framework.

Below is my code snippet:

#define STATE_GPIO_TOUCH_BUT1 4 // PIN definition for button 1
int threshold_diff = 1000;
touchAttachInterrupt(STATE_GPIO_TOUCH_BUT1, gotTouchBut1, touchRead(STATE_GPIO_TOUCH_BUT1)+threshold_diff);
void gotTouchBut1(){
 Serial.print("Button1 ");
 Serial.println(millis());
}

The thresholds are 45,000 for the untouched state and 55,000 for the touched state. Yet the gotTouchBut1() function is never called. Did I miss something?

If I use the same code on an ESP32-S2, it works without problems and enters the interrupt area as desired.

Thanks in advance

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /