I ported Paul Stoffregen’s excellent Encoder library to the Particle platform.
If you have a motor with a built-in encoder or you’re using a rotary encoder as controls in your project you can simply head to the Web IDE, search for the Encoder
library and start counting those pulses by using the Basic example.
Here’s the repository for the Particle port of the Encoder library.
Let me know if you use it!