Armstrong and two Apollo veterans, James Lovell and Eugene Cernan, wrote in a letter to the media that, "Without the skill and experience that actual spacecraft operation provides, the USA is far too likely to be on a long downhill slide to mediocrity."
Obama landed this afternoon at the Kennedy Space Center's shuttle landing facility -- the first president to do that in 32 years. He is the first sitting president in 12 years to visit the center on Florida's Atlantic coast.
The president spoke in a cavernous hall, over two football fields long, where the Apollo capsules were assembled in the 1960s and where the space vehicles of the future, the Orion capsules, were to be assembled.
Obama traveled to Florida with Aldrin, NASA Administrator Charlie Bolden, Sen. Bill Nelson, D-Fla., and Democratic Reps. Suzanne Kosmas, whose district includes the Kennedy Space Center, and Sheila Jackson Lee from Houston, where Johnson Space Center is located.
Before his address, Obama got a first-hand look at some of the NASA's cutting-edge technology, the Falcon 9 rocket -- a commercial rocket scheduled to take cargo to the international space station sometime next month after its first test launch.
Obama set ambitious goals: crew missions beyond the moon and into deep space by 2025 and orbiting Mars by 2030.
He expects "to be around" to see a Mars landing.
He paid homage to the astronauts and scientists who made the first moon landing possible.
"It wasn't just the greatest achievement in NASA's history, it was one of the greatest achievements in human history," he said. "And the question for us now is whether that was the beginning of something or the end of something. I choose to believe it was only the beginning."
ABC News' Matt Gutman contributed to this report.