Ancient Greeks built a machine that calculated positions in the sky
The Antikythera mechanism, built around 150–100 BCE, used gears to calculate astronomical cycles and positions. Machines of similar known complexity do not appear again in surviving evidence until mechanical astronomical clocks in medieval Europe more than a thousand years later.