The portable sensor, which consists of chemically modified carbon nanotubes, works by detecting the gases emitted by rotting meat."The device could be deployed in 'smart packaging' that would offer much more accurate safety information than the expiration date on the package," said senior study author professor Timothy Swager from MIT.

It could also cut down on food waste. "People are constantly throwing things out that probably aren't bad," Swager added.In this study, the researchers tested the sensor on four types of meat: pork, chicken, cod and salmon. They found that when refrigerated, all four types stayed fresh over four days and when left unrefrigerated.

"The advantage we have is these are the cheapest, smallest, easiest-to-manufacture sensors," Swager said.