For millennium, battle planners wanted to create a machine that could travel below the surface of a body of water and perpetrate a lethal combat on an opposing surface force. The ancient Greeks and Romans tried but created only compartments that could support life for a short amount of time, often embarrassing and clumsy lifeless contraptions that were helplessly buffeted by the waves. It really wasn’t until 1620 that a Dutch inventor named Cornelius Drebbel that made the first working submarine. He made a series of them and after each test built a larger version. His 6 oar 16 passenger model submerged for three hours in the Thames on a number of occasions , once in front of King James I. It went from London to Greenwich and back at a depth of 15 feet. It is said that Drebbel had the King on board for a test run. This would make the King the first monarch to travel under water.
One of the questions about the atmosphere inside the Drebbel sub is how they managed to stay so confined and not poisoned by carbon monoxide. One theory is that Drebbel heated potassium nitrate in a pan to emit two gasses. One was oxygen, and the other was potassium oxide, which conveniently absorbs carbon dioxide. This would make him the inventor of the rebreather.
Sources: wiki, Submarines, Leviathans of the Deep, T.L. Francis, 1997 Michael Friedman Publishing.