(though not sure when the cotton gin was invented)
Eli Whitney was invented in 1792 and he received the first patent for a cotton gin in 1794. His employer, Caty Greene, wife of RI General Nathanel Greene, suppossedly came up with the idea. Cotton seed are believed to have been planted in Florida in 1556 and in Virginia in 1607. By 1616, colonists were growing cotton along the James River in Virginia.
Cotton was first spun by machinery in England in 1730. The industrial revolution in England and the invention of the cotton gin in the U.S. paved the way for the important place cotton holds in the world today.