Four students from Mesa View Middle School in Huntington Beach might just be the answer to safe biking.

The students put together a bike that, once someone is on it, will not stop beeping until the rider puts a helmet on. It serves the same function seat belts do in cars, said seventh-grader Zachary Goodale, one of the four students.

The bike senses when someone is getting ready to ride it through radio frequency, a transmitter and receiver. Once the helmet is on, the transmitter detects it and the person is ready to go.

"We brainstormed, and that was one of the ideas," Zachary said. "We got a little help from my dad. He showed us the basics and we built it."

Zachary and his partners — Huongly Do, Grant Gochman and Bijan Afghani — are all seventh-graders and part of the Gifted and Talented Education (GATE) program. They decided to go ahead with the project after hearing about a student who died in a biking accident, said Kathy Pirkle, the students' advisor and Zachary's mom.

The project, Surf City Smart Bikes, was put together by the students for a national science, technology, engineering and math competition called STEM. The competition is sponsored by a U.S. Army program called eCybermission and is intended to teach students to improve their community through the use of scientific methods, Pirkle said.

The project took first place in the state then won the regional competition, which includes 12 states. Now the students have been invited to compete for national first place in Washington, D.C. Their trip is scheduled from June 20 to 25, Pirkle said.

"I'm the type of parent who looks outside the box, and I just thought it was a great opportunity for the students to enter something like this, and it's a great learning experience," Pirkle said.

The students applied for a patent of the bicycle, but will make the decision once they research whether the bike would be made and marketed by companies, Pirkle said.

"It's kind of nice to know that we're helping improve the community and winning this competition," Zachary said. "It's a big accomplishment and it's kind of nice."