SENSING MOVEMENT FROM ROTATION

Pylon thaks for the response.

Ive just been moving the magnet close to the reed swith by hand and taking it away at a timed interval ie to close the switch 1 every second should give 60rpm (i have a stopwatch only). The actual readings are higher and closer to 400 rpm. So im confused a bit.

Maybe you can explain how I might be getting "2 rising edges per round"? I would have thought the 2nd rise would be the start of the 2nd rev? so that means 1 rise per rev right?

So thinking more... Id actully like to be able to use the second sketch (without interrupts) but convert the out to rpm. ie Currently it outputs "buttonPushCounter" but Id like to somehow convert this to an rpm output. Im a begginer here so sorry if that seems simple. Im a bit consued with best place to do this conversion in the if statements.

I favour this tecchnique (not using interupts) as it gives me better intefacing/updating with the wifi timing (10sec update) upload to cosm and a correct rpm count when motion has stopped ie it still outputs the currect/last rpm reading even when zero. ( the 1st sketch does not do this, it uses the last rpm reading, not the current if zero)

Hope that mekes sense