(TNS) — ST. LOUIS — Inside a ballroom at Union Station, hundreds of children under the age of 10 on Friday were demonstrating early forms of coding and mechanical design.

Only, they didn’t know it.

They worked in teams this school year to build Lego models with motors and mechanical parts, machines that required simple programming to demonstrate how conveyor belts move bottles through a recycling plant or other waste-management processes.

And now they were displaying and presenting their models at an international exposition held at the FIRST Championship, the most prestigious robotics competition in the world.

“I liked building the model,” said Meg Rodebaugh, a first-grader at Edgar Road Elementary School and a member of Team Cappy, a neighborhood Lego team in Webster Groves. The model she and her five teammates built showed the life of a cardboard box from its processing, recycling and reuse.

FIRST — For Inspiration and Recognition of Science and Technology — was founded 26 years ago by inventor Dean Kamen to turn more American students on to science and math. Its robotics teams have become an international draw. For three days ending Saturday, 29,000 students from 40 countries including Russia, South Korea and Lebanon are competing at the world championship downtown.

Children involved in this youngest division of robotics — FIRST Lego League Jr. — don’t necessarily compete. They present their projects to judges who give them feedback and issue each team an award.

The experience is intended to build confidence and get children interested in gears and switches, problem solving and research.

They have to compromise and figure out ways to make group decisions, something that is not always easy when you’re 7 or 8. Much of the experience involves play.

“The kids don’t realize they’re learning science,” said Kathy Reuter, who helped bring FIRST Lego clubs to the St. Louis area and serves as the FIRST Lego League Jr. partner for Eastern Missouri. “They think they’re just building and getting a robot to do things. I have kids who are in second grade who are coding because of this program. It has opened up all kinds of avenues for these children.”

The highest echelons of robotics are the high school-level clubs that must design, program and build remote-controlled robots from metal rods, gears, cogs and other widgets, including motors and computer chips. Teams have six weeks to build their robots using parts that come in a kit, plus whatever else they choose to buy within their budget.

Two other tiers engage younger children to prepare them for the more advanced work.

After the junior Lego leagues come FIRST Lego League for kids in fourth through eighth grades. They build autonomous robots with sensors that must complete specific tasks. They also must do a research project around a topic, which often results in invention.

The junior division was the fastest growing division last year in Missouri, with 22 percent growth. There are about 240 junior Lego teams across the state, according to FIRST.

In Camdenton, Mo., one elementary school has four junior Lego teams, and “We still don’t have room for everybody,” said Andrea Weiss, a kindergarten teacher and robotics coach. So the school holds a lottery for those who want to join.

On Friday, Kamen walked through the ballroom, stopping to talk with children and their coaches about their approach to this year’s challenge: waste management. He posed for pictures with a team from China and then another from New Mexico. He signed autographs. A girl from Florida asked him to sign her T-shirt.

The excitement around science and invention was what Kamen envisioned when he founded FIRST, he said.

“The goal was to get kids excited about things that matter,” he said. “It’s nice that they’re playing sports and getting points, but they’ve got to develop their brains.”

Increasingly, schools are moving toward robotics and other project-based learning as a way to teach science and math.

Mehlville School District, for example, plans to open an elementary school in 2017 that uses this kind of learning approach throughout all disciplines. St. Ambrose Catholic School in St. Louis has made technology and engineering, robotics and coding part of the math curriculum. Sixth-graders built a robot last winter. And eighth-graders have robotics fused into their math instruction.

Megan Smith, U.S. chief technology officer and assistant to President Barack Obama, said all schools should adopt this approach. As teenagers and their robots competed in matchups in the Dome at America’s Center on Thursday, Smith said robotics is a form of active collaborative learning that should be present in science and math classrooms nationwide.

“We can make science class project time,” Smith said. “We can make math much more dynamic and really work hard on our unconscious bias about who’s good at what. We think some people are technical and some aren’t, but that’s not true. Everyone is capable. It’s how we teach.”

Giving all students access to coding and computational thinking is possible, Smith said.

“Part of it is not expensive,” she added. “Part of it is how we approach it.”

The FIRST Championship event wraps up Saturday with final matchups and awards ceremonies at the Dome and at Union Station.

©2016 the St. Louis Post-Dispatch. Distributed by Tribune Content Agency, LLC.