after my series of posts in my blog about photointerrupters and rotary encoders I wrote another post with a practical example: a winding machine. This is a simple homebrew construction but it makes winding a coil comfortable and you can be sure that the number of turns of your coil is correct.
If interested look here:
Here are the other posts of the series:
about rotary encoders:
Hope it helps