WASHINGTON — A day before they were to receive a difficult challenge in a New England robotics competition, 13 students from The Gunnery set about building trebuchets — small catapult-like devices — from scratch.

The students in the boarding school’s brand-new robotics course are just weeks into a course about motors, machines and sensors, but already they are preparing for a robotics competition in March at Fairfield University.

The competition will be a good test, said teacher Monte Blaustein, but he believes they are up for the challenge. A few of them already built a drone in another class, he said.

The school last month received a $6,000 grant from NASA to compete in the FIRST Robotics Competition — For Inspiration and Recognition of Science and Technology. They will face teams from high schools in Connecticut, Massachusetts, New Hampshire and Vermont.

The Gunnery was the only school in the state to receive a starting grant from NASA this year, although two others got sustaining grants. Blaustein has high hopes for his rookie squad, and students Friday said they were nervous, but optimistic.

The team’s task, closely guarded until six weeks before the competition, was to be revealed Saturday, along with a box of motors, gears and wheels.

Even Blaustein said he did not know what to expect: Last year, teams had to build a robot that could climb a wall, place a gear on it and throw a ball, he said.

The robotics class is part of the school’s new engineering program, directed by Blaustein, which consists of seven courses.

In a news release, Blaustein said his rookie team got the grant because “NASA was looking for teams that were viable, that they felt had a strong possibility of success.”

The students will have to do all the heavy lifting themselves, with little help from Blaustein or from other mentors.

Blaustein, a former engineer, said robotics and engineering are unlike other scientific courses, where students are asked to re-create experiments while knowing the expected outcome

In engineering, by contrast, “they learn by trial and error,” he said. “There will be lots of failures before success.”

Friday afternoon, the students were doing just that as they neared their trebuchet deadline. Blaustein had given them just 2 1/2 hours, from concept drawing to completion, to build the device.

The class was split into three teams, all using wood, drills and bolts to launch a small ball.

Lucas Rosati, a sophomore, was on the team building the smallest trebuchet. They had to figure how to secure a nine-inch bolt through a 10-inch gap, but they had ordered the wrong parts.

Rosati and his teammates quickly fixed the mistake by narrowing the gap with more wood.

“We hope it will work,” Rosati said.

blytton@hearstmediact.com; 203-731-3411; @bglytton