Program? you tell it how big the wheel is and it counts rotations , then extrapolates speed by the frequency..
and Miles traveled by the Sum.
replacing the battery zeros out the Miles accumulated data.. write that down before putting a New battery in.