Students at American Canyon High School have been working on miniature computers to detect greenhouse gases in the Napa Valley as part of a lesson plan studying climate change.

Their work, if successful, could continue long after they’ve graduated, and help a Bay Area environmental agency collect important data on carbon dioxide and other gases that contribute to global warming.

“Climate change is a serious problem,” said senior Lukas Lopez. “Some people might say it’s a hoax, but I think it’s real.”

Lopez and fellow senior Tim Samson have been leaders on a project developed by physics teacher Daniel Rosales at ACHS.

They’ve been using a small, single-board computer known as Raspberry Pi and modifying it to measure what’s in the air, everything from temperature and humidity to CO2 levels.

Rosales intends to take the prototype his students are developing and eventually install them throughout the Napa Valley to measure greenhouse gases.

The physics teacher, who’s been involved in developing computer science studies at the high school, wants to see “if there’s a difference with greenhouse gases up the valley,” if the levels differ seasonally or if they increase from year to year.

Climate change is “an important issue. We need to know how to measure it,” said Rosales.

His project is also giving students like Lopez and Samson a hands-on education working on computers and overcoming challenges.

The Raspberry Pi, only a few inches in size, was created in the United Kingdom as a learning tool for students interested in computers. The basic model is not designed or equipped to read air quality and transmit data on what it finds.

But with the help of a “Raspberry Pi Kit for Dummies,” Rosales and his students have been adding other parts to the computer so it might function as a greenhouse gas detector.

Lopez and Samson have spent a chunk of their senior year at ACHS trying to make all the parts work together.

They’ve had to download specialized software and troubleshoot problems so a sensor attachment communicates effectively with the Raspberry Pi as well as other attachments, such as an LED readout.

“It’s really different” working on this project, said Samson. “With most programming and software, you can’t see it tangibly outside the monitor screen. Everything is in 2-D.”

“But when I’m working on robots and the Raspberry Pi’s, it’s all in 3-D,” he said, referring to how his programming can be applied. “It’s tangible, and that’s a wonderful experience.”

Samson, who intends to study computers and physics in college, said his work in Rosales’ classroom is similar to “when computers were a lot more primitive.”

It has given him a better understanding of how a CPU [central processing unit] — a computer’s brain — works and the electronics behind it.

“This is a nice experience,” said Samson.

It has not been cheap, however.

Rosales said a single modified Raspberry Pi with all the parts can cost about $150. He was able to purchase a few of them using a grant he got from the Bay Area Air Quality Management District.

Once his students figure out all the bugs in the programming, and they know the Raspberry Pi can measure the surrounding atmosphere, Rosales intends to apply for a second grant from the agency so he can buy more of them and place the devices up and down the Vine Trail.

He said the minicomputers will be able to transmit their data to a server, and from there Rosales will share the information with the Bay Area Air Quality Management District.

“We’ll be collecting data for the valley every year,” said Rosales.

The project, he says, gives students a “real world problem, and that’s what we’re all about — connecting the education to the world.”