I m a newbie and would like to implement an anemometer and BME280 sensor to my weather station project.
Regarding the anemometer, the code I show here is from our colleagues of projects.raspberrypi.org. In this approach, the Rpi detects via GPIO pin (the anemometer has 2 wires, one goes to GPIO and the other to GND), how many times the reed switch within the anemometer is triggered (twice for a complete rotation) and then, by counting and timing these signals, the speed of the wind is calculated. The gpiozero library is used in this project. The code is attached below.
I beg for a good samaritan to give me a hand with this code to adapt it to MQTT and be compatible with cayenne. Any other way to find a solution is welcome…(e.g. use other gpio library and end with gpio.cleanup, etc).
…I also beg for the same or another good samaritan, to share a code to connect BME280 (temp, humidity and pressure sensor) via MQTT protocol to cayenne…
Many many thanks in advance,
Oscaranemometer.txt (1.3 KB)