The Greek scholar Heron of Alexandria created the earliest known automatic door in the 1st century AD during the era of Roman Egypt. The first foot-sensor-activated automatic door was made in China during the reign of Emperor Yang of Sui (r. 604–618), who had one installed for his royal library.