President Barack Obama arrives to speak in the East Room of the White House in Washington, Monday, March 23, 2015 during the 2015 White House Science Fair. The fair celebrated the student winners of a broad range of science, technology, engineering, and math (STEM) competitions from across the country. This year's Science Fair has a specific focus on diversity and includes many students. (AP Photo/Susan Walsh)

The small Lego machine inside the White House whirred, and in a moment it was turning the pages of a story book. One page flipped, then another, ever faster as President Barack Obama marveled at its efficiency.

The contraption's eventual aim would be to allow paralyzed or arthritic patients to read books despite their disabilities.

"How did you figure this out?" Obama, impressed, asked its inventors.

"We had a brainstorming session," one of the five 6-year-old Girl Scouts replied.

The kindergartners and first graders from Tulsa, Oklahoma, were among 35 young science fair winners who came to the White House Monday to showcase breakthroughs ranging from spinal implants to carbon-dioxide powered batteries to a keystroke identity system that can backup computer password securities.

Obama used the event to highlight private-sector efforts to encourage more from underrepresented groups to pursue education in science, , engineering and math. He announced more than $240 million in pledges to boost the study of those fields, known as STEM. This year's fair is focused on diversity.

While awed by all of the displays, none seemed to delight Obama more than the Lego page-turner.

Obama allowed as to how the device might need a little adjustment given that, at the current speed, a reader might only catch three sentences in a page.

President Barack Obama poses with six-year-old Girl Scouts from Tulsa, Okla. during the White House Science Fair, Monday, March 23, 2015, in the Red Room of the White House in Washington. The Girl Scouts, including, Emily Bergenroth, Alicia Cutter, Karissa Cheng, Addy O'Neal, and Emery Dodson, used Lego pieces and designed a battery-powered page turner to help people who are paralyzed or have arthritis. (AP Photo/Jacquelyn Martin)

"It's a prototype," one of the Girl Scout designers replied matter-of-factly.

"Have you ever had a brainstorming session yourself?" one little girl asked.

Indeed, yes, the president replied.

"What did you come up with?"

"I mean, I came up with things like, you know, health care," he said, amused. "It turned out ok, but it started off with some prototypes."

The the president announced include a $150 million philanthropic effort to encourage promising early-career scientists to stay on track and a $90 million campaign to expand STEM opportunities to underrepresented youth, such as minorities and girls. Altogether, the new STEM commitments have brought total financial and material support for these programs to $1 billion.

"It's not enough for our country just to be proud of you. We've got to support you," Obama said later, addressing students and scientists in the White House East Room.

President Barack Obama, who was speaking in the East Room of the White House in Washington, Monday, March 23, 2015, during the 2015 White House Science Fair , jokingly gestures towards the exit doors after he smelled smoke during the event. The fair celebrated the student winners of a broad range of science, technology, engineering, and math (STEM) competitions from across the country. This year's Science Fair has a specific focus on diversity and includes many students. (AP Photo/Susan Walsh)

More than 100 colleges and universities have committed to training 20,000 engineers, and a coalition of CEOs has promised to expand high-quality STEM education programs to an additional 1.5 million students this year.

Obama launched "Educate to Innovate," his effort to encourage the study of science, technology, engineering and math, in 2009.

Obama said the fair is one of the most fun events held annually at the White House. "Every year I walk out smarter than when I walked in," Obama said.

Indeed, Obama's adviser, John Holdren, joined the president during the tour of the displays, introducing himself to the young inventors and researches. "Amazing," he said. "These kids are so much more advanced than when I was in school."

President Barack Obama speaks in the East Room of the White House in Washington, Monday, March 23, 2015, during the White House Science Fair, where he was expected yo announce more than $240 million in pledges to boost the study of those fields, known as STEM. This year's fair is focused on diversity. (AP Photo/Jacquelyn Martin)

At each of the 12 display stations, Obama quizzed the participants about their projects. At one, Anvita Gupta, a 17-year-old from Scottsdale, Arizona, described the special algorithm she had devised to identify other medical applications for existing drugs.

Obama turned to the group of reporters and photographers trailing him.

"Just saying, I don't know what you all have been doing," he said. "This is what she's been doing."

  • President Barack Obama speaks in the East Room of the White House in Washington, Monday, March 23, 2015, during the 2015 White House Science Fair. The fair celebrated the student winners of a broad range of science, technology, engineering, and math (STEM) competitions from across the country. This year's Science Fair has a specific focus on diversity and includes many students. (AP Photo/Susan Walsh)

  • President Barack Obama tours an exhibit with six-year-old Girl Scouts frpom Tulsa, Okla., during the White House Science Fair in the Red Room of the White House in Washington, Monday, March 23, 2015. The Girl Scouts, Emily Bergenroth, Alicia Cutter, Karissa Cheng, Addy O'Neal, and Emery Dodson, used Lego pieces and designed a battery-powered page turner to help people who are paralyzed or have arthritis. (AP Photo/Jacquelyn Martin)

  • President Barack Obama tries out a wheelchair with a design modification by Kaitlin Reed, 16, of Dover, Mass., next to Mohammed Sayed, 16, of Cambridge, Mass., who is originally from Afghanistan, during a tour of the White House Science Fair at the White House in Washington, Monday, March 23, 2015. Sayed and Reed both developed wheelchair modifications. At a speech during the Science Fair Obama will announce more than $240 million in pledges to boost the study of those fields, known as STEM. This year's fair is focused on diversity. (AP Photo/Jacquelyn Martin)