A trio of clever teenagers has created a quacking new way to detect pollution in the world’s open waters.

Over just four days, Ben Hope, Harri Bell-Thomas, both 18, and Benedict Allen, 17, brought Watt the Duck to life at Monmouth School in preparation for a national coding competition.

Under their team name, Buoy, the pupils put together a “genius combination” of Raspberry Pi computers, sensors and a duck to revolutionize how data from oceans, rivers and lakes is collected.

More than 1,200 children from 66 centres across the UK flocked to Birmingham’s ICC for Young Rewired State’s Festival of Code, which ran between Friday and Sunday.

And after grueling presentations to industry experts at the “world’s largest hackathon”, judges crowned them winners of the Code a Better Country category.

Ben said: “It was an amazing festival and we were so happy to win.

“We were up against some pretty impressive competition.

“Philip Colligan, the CEO of the Raspberry Pi Foundation loved our idea.”

“Looking inside the duck, he said ‘this is beautiful’,” Harri added.

“We were walking on air at that point.

“When they announced us as the winners, I think Ben screamed – it made me jump.”

The team’s small, autonomous, Raspberry Pi-powered duck boat records and posts data about its environment, including temperature, humidity and UV readings, with live PiCam feed from the boat, to a web and mobile app client.

It represents these readings in charts, graphs and maps – potentially saving huge amounts of time, money and man power.

A popular hashtag on Twitter, #WatttheDuck, helped to create a buzz on social media for the team’s entry.

And they have already had interest from a venture capitalist, exploring supporting the invention’s development.

Benedict, who is awaiting AS level results from Hereford Sixth Form College, teamed up with Ben and Harri, A level pupils at Monmouth School, to devise Buoy in the week before the festival.

He said: “Hopefully, the next step is to secure some funding and build a more robust prototype.

“We had lots of interest on Twitter – lots of people approached us.

“I’m looking forward to the research aspect of it.”

Ben added: “There are so many different uses for it.

“Huge companies like BP could use a massive version of the duck on oceans, and private owners can have small ones for their lakes.

“The duck came around because we needed somewhere waterproof and buoyant to house all of the important stuff.

“We were inspired by the 29,000 rubber ducks which spilled out from a cargo ship 20 years ago and have floated around the world’s seas since.”

Lyndsay Hope, Head of Computing at Monmouth School, said: “It was so exciting and absolutely nerve-wrecking to see the boys in the final.

“There were around 200 teams overall, with a huge number of great projects.

“It was a genius combination of Raspberry Pis, sensors and ducks.”