An odometer for measuring distance was first described by Vitruvius around 27 and 23 BC, although the actual inventor may have been Archimedes of Syracuse (c. 287 BC – c. 212 BC) during the First Punic War. Hero of Alexandria (10 AD - 70 AD) describes a similar device in chapter 34 of his Dioptra. The machine was also used in the time of Roman EmperorCommodus (c. 192 AD), although after this point in time there seems to be a gap between its use in Roman times and that of the 15th century in Western Europe. Some researchers have speculated that the device might have included technology similar to that of the GreekAntikythera mechanism.
The odometer of Vitruvius was based on chariot wheels of 4 feet (1.2 m) diameter turning 400 times in one Roman mile (about 1400 m). For each revolution a pin on the axle engaged a 400 tooth cogwheel thus turning it one complete revolution per mile. This engaged another gear with holes along the circumference, where pebbles (calculus) were located, that were to drop one by one into a box. The distance traveled would thus be given simply by counting the number of pebbles. Whether this instrument was ever built at the time is disputed. Leonardo da Vinci later tried to build it himself according to the description, but failed. However, in 1981 engineer Andre Sleeswyk built his own replica, replacing the square-toothed gear designs of da Vinci with the triangular, pointed teeth found in the Antikythera mechanism. With this modification, the Vitruvius odometer functioned perfectly.
see the video :