Cam
late 18th century: from Dutch kam ‘comb’, as in kamrad ‘cogwheel’.
wiktionary
Recorded since the 16th century, from Dutch kam(“ cog of a wheel; originally, comb”) (cognate with English comb, and preserved in modern Dutch compounds such as kamrad, kamwiel(“cog wheel”)). Doublet of comb.
Clipping of camera, from the first part of Latin camera obscura(“dark chamber”), itself from Ancient Greek καμάρα(kamára, “vaulted chamber”), from Proto-Indo-European *kam-(“to arch”)
cam ( comparative more cam, superlative most cam)
etymonline
cam (n.1)
1777, "a projecting part of a rotating machinery used to impart motion to another part," from Dutch cam "cog of a wheel," originally "comb," from Proto-Germanic *kambaz "comb," from PIE root *gembh- "tooth, nail." It is thus a cognate of English comb (n.). This might have combined with English camber "having a slight arch;" or the whole thing could be from camber. It converts regular rotary motion into irregular, fast-and-slow rotary or reciprocal motion. "The original method was by cogs or teeth fixed or cut at certain points in the circumference or disc of a wheel ..." [OED]. Cam-shaft attested from 1850.
cam (n.2)
abbreviation of camera, by 1990.