Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!

Home Page:https://kno.wled.ge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some sort of calibration for the touch pad on ESP32 for the Threshold value.

mtabo opened this issue · comments

Currently you can only set the threshold value of the touch pin with values between 1 and 100, but we have no way of knowing how the button responds to being pressed and not, so I can not determine a fairly accurate value for it, as an example ESPHome has a "setup" mode (link) that shows you in the log the values of the touch sensor, with that you press and release it and you can infer an approximate threshold value between the average value when you press it and when you release it and apply it to the threshold of the button.

I think it would be useful to have a calibration button, that makes you do two steps, one that measures the button without pressing and makes an average of those values, then do the same when it is pressed and with those two average values take the average value as threshold.

Is it possible to do this?

Best Regards

Hi!, i have a few questions:

  • Anybody know where in the code is the touch button handling?
  • How can i see the logs of WLED? Adding #define WLED_DEBUG on wled.cpp is sufficient to see it in the serial console?
  • In the file settings_led.htm the field for write threshold have a min 0 and max 100, the max value is insufficient for some cases when a plastic material is between the plate and the finger, the limit to 100 is only there or there is a value check down in the code that set the variable?
    Best Regards!