magnetic weel encoder

Probably better to use a hall effect sensor. No issues with bouncing from the reed switch then.