Now they have released the results from the first human trials of the capsule, which collects information about the gases and transmits it to a hand-held device and mobile phone for doctors to read.
A group of 26 people took part in the trials last year and proved the capsule was safe for use in humans, paving the way for more extensive tests in 2019.
"Our capsules were very selective and sensitive in defining the conditions of the gut, much more selective and sensitive than, say, analysis of fecal samples," Lead researcher Professor Kourosh Kalantar-zadeh said.
The trials also delivered surprising results about the workings of the gut's microbiome, the colony of trillions of bacteria that are believed to help keep us healthy.
The team discovered the stomach releases oxidising chemicals to get rid of foreign bodies, possibly as a protection mechanism.
"We have many observations that have not been reported before," Professor Kalantar-zadeh said.
They also discovered that people on high-fibre diets have high amounts of oxygen in their colon - information that overturns a long-held theory that the colon is oxygen free and may help scientists work out how colon cancer develops.
The capsule's other co-inventor Dr Kyle Berean said this discovery alone gives people more of an incentive to watch what they eat.
"If we can actually have a dietary intervention that pushes a lot of oxygen into the colon, we can kill off a lot of bacteria, and maybe replace antibiotics and some of the problems that come with antibiotics won't be a problem in the future," he explained.
Melbourne-based public servant Keegan Hughes was one of the 26 test subjects. He described the experience as "like something out of the future".
"Eating right is really important, but when you're trying a new diet you don't really know how good it is or what it's doing to you when you start it," he said.
"With a pill like this, you could see what was happening to your gut and how quickly your body is responding."
The most common methods currently used are breath and faecal tests, with some patients undergoing surgery so direct samples from the gut can be examined.
Dr Berean said the trial results suggested the capsule was more accurate and less invasive than existing methods used to measure intestinal gases.
"Right now there's one in five people that suffer from gastrointestinal disorders, and up to 15 per cent of these people will never get a proper diagnosis," he explained. "If we can use a device like this to get a rapid diagnosis, it will make a tremendous difference to the burden on the healthcare system."
The scientists are trying to raise up to $8 million for the next round of clinical trials of the device in 300 patients with digestive issues including irritable bowel syndrome and intestinal bacterial overgrowth.
All going well, they hope the capsule will be on sale by 2020 for between $100 and $200.
The results from the first human trials were published on Thursday in the journal Nature Electronics.
- Additional reporting by Emmanuel Tsigas