Who invented the cam?

Cams were first used in Hellenistic civilization in 3rd century B.C. Al-Jazari was the first person to employ them in Camshafts.