I've had this problem in the past with testing where the touch sensors pick up noise randomly. In my recent project it would register as being pressed for 1/2 a second but when it would print its reading it would show a value too high meet the press threshold. It seems like if you read the button->wait-> read again it clears the noise on the pin.
I have wifi and FastLed running. I'm sure the wifi has something to do with this. It seems like a lot of time working with the esp32 is spent working around problems like this.
uint8_t threshold =12;
if ( touchRead(T2) < threshold){
delayMicroseconds(5); //ghost press debounce . I'm surprised it works so quickly even 1us reduced it quite a bit.
if ( touchRead(T2) < threshold){
pin2State = true; cout << "|" << touchRead(T2) ;}}else{ pin2State = false; } //this would print a value higher than 12 before I added the delay
capacitive touch noise / ghost touching solution
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- ESP32-S31
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- ESP32-S31 中文讨论版
- 喵伴 中文讨论版
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: No registered users and 1 guest
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.
Information
Espressif ESP32 ... Available now!