Add ESP32 touch sensors as button alternative (#1190)
* Add touch option to button handler * Check if touch is pressed in setup * Add TOUCHPIN build env and override example Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
This commit is contained in:
@@ -250,8 +250,8 @@ void WLED::beginStrip()
|
||||
#endif
|
||||
|
||||
// disable button if it is "pressed" unintentionally
|
||||
#ifdef BTNPIN
|
||||
if (digitalRead(BTNPIN) == LOW)
|
||||
#if defined(BTNPIN) || defined(TOUCHPIN)
|
||||
if (isButtonPressed())
|
||||
buttonEnabled = false;
|
||||
#else
|
||||
buttonEnabled = false;
|
||||
|
||||
Reference in New Issue
Block a user