Weather Shield wind speed problems

There’s something wrong with the wind speed on myWeather Shield. I can see the anemometer turning, but the speed is reported as zero. Then it will suddenly jump to 3.9 or 7.2 (always one of those two numbers) and then back to 0, even though the anemometer itself is turning at about the same speed. And I can’t figure it out.

I’m using the Sparkfun code in Photon_Weather_Shield-master. In fact looking at the code, it seems like it should work. Any help with this would be most appreciated. Here’s the relevant code:

void wspeedIRQ()
// Activated by the magnet in the anemometer (2 ticks per rotation), attached to input D3
  if (millis() - lastWindIRQ > 10) // Ignore switch-bounce glitches less than 10ms (142MPH max reading) after the reed switch closes
    lastWindIRQ = millis(); //Grab the current time in ms. since th4e device booted.
    windClicks++; //There is 1.492MPH for each click per second.
}  // end wspeedIRQ

float get_wind_speed()
  float deltaTime = millis() - lastWindCheck; //750ms

  deltaTime /= 1000.0; //Covert to seconds

  float windSpeed = (float)windClicks / deltaTime; //3 / 0.750s = 4

  windClicks = 0; //Reset and start watching for new wind
  lastWindCheck = millis();

  windSpeed *= 1.492; //4 * 1.492 = 5.968MPH

  /* Serial.println();

}  // end get_wind_speed

I have exactly the same issue. It must be a software issue because i use the same piece of code, but i’m not able to find the bug. Anyone could help?

I had an issue with it not reading speed above 15. I will have to go threw my code more but what was posted above is in my system right now that works.

There is definitely some sort of weirdness going on with the wind code. I made no changes to it but now the speeds are correct. Except that the gust value often reads exactly 11.7 even on days when there is almost no wind. It’s always 11.7. A while later it will reset to zero, and then an hour later it’s back to 11.7. And I don’t see how it’s coming up with that.

“I had an issue with it not reading speed above 15.”

I’ve seen values up to 19 mph on mine. I’m sure there’s some limit that exceeds the Photon’s ability to process interrupts but I don’t know what that is.

Right now I’m more concerned with the Photon disconnecting from the web and then failing to reconnect. I have to go out in the back yard and cycle the power to get it to reconnect.