Giter VIP home page Giter VIP logo

Comments (3)

OttoWinter avatar OttoWinter commented on May 18, 2024

Already possible with the pulse counter sensor: https://esphomelib.com/esphomeyaml/components/sensor/pulse_counter.html (which will even be backported to the ESP8266 in 1.7.0)

The only thing that would need to be done is a conversion from the pulse count to the wind speed. In the code I see this formula that should work: wind = 1.761 / (1 + rps) + 3.013 * rps;. See the TEMT6000 example for inspiration.

A formula could for example be:

sensor:
  - platform: pulse_counter
    pin: GPIOx
    # ...
    filters:
      - lambda: >-
          return 1.761 / (1 + x) + 3.013 * x;

from esphome.

hanzoh avatar hanzoh commented on May 18, 2024

Cool, I currently only have ESP8266 boards, but I have ordered a ESP32 and will definitely try the pulse counter. Thanks!
The code I have linked to also uses a debounce value of 5ms, would you recommend that as well (via filters - debouncing)?

from esphome.

OttoWinter avatar OttoWinter commented on May 18, 2024

Yes, definitely. I myself am using a similar wind sensor and a single turn can create many hundred pulses without any filtering.

from esphome.

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.