Source code required..HELP!!!

You cannot derive the speed from the frequency of the pulses.

If a wheel of 36 inches diameter rotates at the same rate as one of 24 inches diameter (or any other diameter for that matter) the pulse rate will be the same but the bike will be going at a different speed.