Obama toured Buck Lodge Middle School in Adelphi, Maryland, where seventh-grade students were using tablets to work on math problems based on the Rover explorer on Mars.
Obama borrowed a tablet to film his security entourage. "That's Mike, my Secret Service agent. He never smiles," he quipped.
Then he pledged to do more through executive actions and the bully pulpit -- the pen and the phone -- to modernize classrooms with technology.
"It makes vivid and real math and science, in a way that is more interesting to the students," Obama said in a speech after his tour of the school, which is among only 30 percent of schools in the nation with adequate access to high-speed Internet.
"That's how it should be for everybody, not just some," he said.
The school in Adelphi, a middle-class suburb of Washington, D.C., bought tablets with money from the $847 billion economic stimulus package Congress passed five years ago.
With Obama's efforts to spend more money on education -- as well as other programs -- having failed to gain traction in Congress, he and the White House have tried to find alternative ways to address issues.
The Federal Communications Commission said it would spend $2 billion over two years to upgrade Internet speed and quality in 15,000 schools serving 20 million students.
Obama also secured pledges from private companies to provide more than $750 million in devices, software and wireless service to U.S. students.
The donations include free iPads for poor schools from Apple Inc, free software from Autodesk Inc, marked-down software from Microsoft Corp, and donations of wireless services from AT&T Inc, Sprint Corp and Verizon Communications Inc.
"They want educated customers," Obama said, noting the companies gain an edge by making more consumers familiar with their products.
"They want customers who are able to get good jobs," he said.
Obama said he would ask Congress later this year for more money to help train teachers.
"Technology is not a silver bullet," he said. "It's only as good as the teachers who are there."