Source code required..HELP!!!

edifiedsprit:
That guy didn't use diameter of the wheel.

That doesn't seem very likely.

Think about it. You get 8 pulses and know that the wheel has made one revolution and you know how long it took, but how far has the bike moved forward ? Without knowing that how can you work out the speed ? You have to know the circumference of the wheel either derived from the diameter or measured directly.