Sounds like a great idea!
The magnetometer on the Puck is handy, but it only outputs readings 80 times a second. I did a quick check and at 20 km/hr a typical wheel should be rotating 2.5 times a second, so it should work well enough.
However, when running at that speed it draws a bit of power (1mA, so only 200 hrs battery life), so you'd have to be careful to only turn it on for high speed readings when it thought the bike was moving.
In many ways just using a reed switch (especially if you used one off a cheap bike computer that's all set up for it) would be easier. You then don't have to worry about power consumption at all, as Puck.js will only wake up when it detects the input change state.
© Espruino, powered by microcosm.
Report a problem