Closed towboogie closed 5 years ago
You must check voltage level on wind pin at first. Set voltmeter on wind pin and slowly rotate anemometer by hand. Voltage must have only two values: first - close to 0V, second close to 3.3V. May be you realy need pull up resistor to VCC or GND, depend from result of measurement
Hi,
Do you think a pull up resistor is necessary on the wind pin? I sometime get some high windspeed or 0 windspeed readings very randomly. I am going to add this today to see if it helps.
I also i added some debounce to the wind speed measurements which shouldhelp with switch debounce.
void windcount() { if((long)(micros() - last_micros) >= debouncing_time * 1000) { windimpulse++; last_micros = micros(); digitalWrite(LED, !digitalRead(LED)); } }