I am currently working on the starting behaviour of a small DC motor with a metal shaft attached to it. The other end of the shaft is mounted in a bearing and I am looking for a convenient way to capture the rotary speed of the shaft using my RPi2. Any ideas?
Ideally, I am looking for an output that looks something like this:

The above image shows a graph in MATLAB/Simulink, this software is available as well is needed.
Thanks for all ideas in advance!