You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Oh perfect - I didn't look there! So yeah, wiring it up will be trivial.

    You could wire to anything but let's say you chose to wire one side to GND and one to B3:

    var lastRotation = getTime();
    function anemRotated(e) {
      var d = e.time-lastRotation;
      lastRotation = e.time;
      console.log("Speed = "+(60/d)+" rpm");
    }
    pinMode(B3, "input_pullup"); // activate pullup resistor
    setWatch(anemRotated, B3, {repeat:true, edge:"falling"});
    

    You'd need to run something every few seconds that's check whether it had in fact stopped turning, but otherwise that's it...

About

Avatar for Gordon @Gordon started