Alexandria, Egypt, c. 1st century Heron (c. 10-70), in paragraph 34 of the Dioptra, described the odometer, i.e. the device indicating the distance travelled by a vehicle during a trip. Heron's odometer contained a fairly straightforward engineering mechanism: the wheel force of the trolley moved several gears. The gear picked up several balls and made the circular bhat platform spin that had a hole. When spinning, the balls fell one by one into the hole, and through a tube, they were stacked in a box. The number of balls was counted, the corresponding multiplication was done and the result was quite accurate. According to the odometer of Antiquity, the distance between Hecatompylos and Alexandria, introduced into the metric system, was 850 kilometers, being the real distance of 852 kilometers.
But the device doesn't seem to have been invented by the Heron of Alexandria himself. Vitruvius, in the 15th century BC. By the year 23, he cited a similar article. And Estrabon and Pliny, like Alexander the Great, came to the island in 812 AD. Distances from journeys made in the fourth century were collected; the accuracy of these distances suggests that a mechanical meter was used.
In ancient China, they also had a device to measure distances, and in the Middle Ages, in the Song Dynasty they used a rather sophisticated accountant. Meanwhile, in Europe the odometer remained inactive until in the seventeenth century Blais Pascal tried to improve the invention of Antiquity. At the end of that century, Thomas Savery invented a boat odometer, in 1895 Curtis Hussey Veeder applied it to bicycles, and in 1903 the Warner brothers patented a car odometer.
In 1775, Benjamin Franklin built a prototype to measure the mailways. But in many biographies of the well-known inventor, they attribute the merit of century-old invention.