The Hall Effect and Proximity Sensor Module is a versatile and tiny device, great for sensing magnets or other physical objects nearby:
Applications include detecting shaft rotation: put a magnet on a rotating shaft and then use the Hall Effect Sensor to count / measure the frequency of rotation, giving you RPM. The module also includes a very handy "triggered" LED, so all you need to do to test it is apply power and watch the LED! Great for debugging your project while getting it sorted.
There's example code and a wiring diagram on the Hall Effect Magnetic and Proximity Sensor Module Quickstart Guide.