Like many fifth-graders, Gavin Cook and Haynes Davis like to play video games. Unlike many fifth-graders, the boys used Xbox and PlayStation 3 to conduct a scientific experiment that would help them build a more efficient robot — determining which buttons they could push faster, the ones on the top of the controller or the ones on the sides.

Hours of research, construction and computer programming won the boys and the rest of their Triangle Elementary School robotics team a trip to California for the world championships of VEX IQ robotics. The five-member team was the only elementary school group in Virginia to qualify for the international event.

The competition required that the contestants build a robot from plastic pieces and write code to operate it. During the competition, Gavin and Haynes had 60 seconds to make the remote-controlled robot complete pre-programmed tasks, such as picking up and moving a ball — just as they had practiced using their Xbox controllers.

“We all use technology in our homes, so it’s fun. We can actually build a robot,” Haynes said.

Teammate Katie Phillips said that she thinks about what she has learned on the robotics team when she plays with Legos at home. “Sometimes I don’t follow the directions. I just build anything, because I know how,” she said.

Haynes Davis, Tiffany Washington, Katie Phillips, Adriana Krek, Gavin Cook.The members of the team in front of the showcase full of their trophies and the cards their classmates made for them. (Julie Zauzmer/The Washington Post)

Team members Tiffany Washington and Adriana Krek said they find robotics so much fun that they use RobotC, the program they use at school to write code for the competition, on their own laptops at home.

Ryan Osweiler, the technology teacher at Triangle Elementary who coaches the school’s robotics teams, said that he knew this group was especially dedicated from the time they started working together last school year, long before their dominant path through local competitions, their win against many middle school teams at the state finals and their trip to the world championships.

Tiffany would come into his classroom to write code during lunch and recess, Osweiler said. Gavin and Haynes asked for permission to take project materials home during winter break. All five team members stayed after school to practice three or four days a week, all year long.

Their hard work was rewarded by the trip to Anaheim last month, where they placed 30th out of 61 elementary and middle school teams, and came in seventh place for their programming skills.

For Adriana and Katie, the trip was their first time on an airplane, and Gavin teased them about their squeals as the plane took off.

All five came home eager to spend the last few weeks of the school year preparing third- and fourth-graders for next year’s robotics competitions. The whole school seems to know of their success — their classmates sent them off to California with posters and cards, and a display case in the school lobby is filled with the trophies they won. Hoping for another shot at a cross-country trip, 28 Triangle students applied for the 15 spots on next year’s robotics teams.

The five who are already winners said that they plan to continue their robotics efforts at Grant Park Middle School and beyond. “I want to do this for the rest of my life,” Tiffany said. Others mention that math and science are their favorite subjects, or that they hope to become engineers.

Adriana said that she had occasionally heard boys say that girls are not as good at math and science, but on their team, all three programmers are girls.

“I think it’s a myth,” she said.

Osweiler said that he introduces advanced concepts during the after-school robotics practices. The school curriculum does not include coding, but the robotics participants can write hundreds of lines of code in the C programming language and create their own functions. To calculate how many degrees a part needs to rotate to make the robot move forward the correct distance, the children needed to understand how to work with pi.

“This is the real-world learning stuff they need. Kids are sick and tired of taking tests,” Osweiler said. “What’s lacking in school today is the hands-on learning. They’re being taught to take a test and that’s it.”

The children on his robotics teams had plenty of real-world experiences to recount. As they eagerly showed off the board that their robot operates on, Gavin recalled one of the highlights of their trip: meeting famed skateboarder Tony Hawk.

“I got to see him in person. I got to talk to him a little bit. I was like, ‘You’re a great skateboarder,’ ” Gavin said. “And he was like, ‘You’re a great robotics player.’ ”