The cotton gin was invented in India by the 6th century AD, and the spinning wheel was invented in the Islamic world by the early 11th century, both of which were fundamental to the growth of the cotton industry. The spinning wheel was also a precursor to the spinning jenny, which was a key development during the early Industrial Revolution in the 18th century. The crankshaft and camshaft were invented by Al-Jazari in Northern Mesopotamia circa 1206, and they later became central to modern machinery such as the steam engine, internal combustion engine and automatic controls.