Giter Club home page Giter Club logo

Comments (3)

OttoWinter avatar OttoWinter commented on July 20, 2024 1

Touch sensors are now supported :) https://esphomelib.com/esphomeyaml/components/binary_sensor/esp32_touch.html

Though not through the interface you proposed (even though I like it a lot), but in a more generic binary touched/not touched way as that was way easier to implement.

Closing this feature request now...

from esphome-core.

OttoWinter avatar OttoWinter commented on July 20, 2024

Sorry for the late reply, somehow this issue/feature request didn't get to my notification center.

Anyway, yes that's a feature I've been working on some time ago. And it would definitely be a good thing to support.

From an API perspective, there are a few problems with the touch sensor support that have delayed my progress on this:

  • The only good way to get notified of a "touch event" is through interrupts (polling takes ~5ms per touch pad, not good). The problem is that we're only notified when a touch begins and we don't know when the user lifts the finger from the touch pad again.
  • Another question is how to integrate this into esphomelib. My current implementation just exposes it as a binary sensor that gets enabled for a short period of time when a touch is detected. Ideally, an "event" domain would be better suited for this, but Home Assistant currently has no such MQTT platform.
  • The values obtained by the touch pads are very different depending on the touch pad used. Therefore there needs to be a lot of customizability. esp-idf does offer this customizability with tons of options like threshold, filters, meas/idle time, attenuation, high/low voltage reference, charge/discharge speed. I will need to evaluate which ones are necessary for good calibration and which ones confuse the user and aren't required for calibration.

(above text is mostly just a small write-up of the problems. It always helps me to write down what needs to be done to make good solutions)

from esphome-core.

jladefoged avatar jladefoged commented on July 20, 2024

I can't really contribute with any technical stuff but i would imagine "a touch-event" and "a long touch-event" of some kind. Maybe a double-press?
An example could be for turning light on/off and a long-touch for diming lights.
I've just noticed it when reading this article: http://www.instructables.com/id/IOT-Made-Simple-Playing-With-the-ESP32-on-Arduino-/
Personally I prefer mechanical buttons because i've like the felling compared to touch, but since the esp32 have capacitive touch sensors it could be a nice feature.

from esphome-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.