Now playing: Watch this: How a young entrepreneur got caught living secretly at...

It was 6 a.m. when Eric Simons was jolted awake by the yelling.

After working until 4 a.m, the 19-year-old entrepreneur had finally passed out. A few hours of sleep would help with the day ahead.

But unlike most people working at AOL's Palo Alto, Calif., campus who were surely still hours from showing up at the sprawling complex, Simons was already there. He'd been living there for two months, hiding out at night on couches, eating the company's food, and exercising and showering in its gym. And now, with an angry security guard bellowing at him, it was all over.

Eric Simons

The story of how Simons, just two years removed from a Chicago high school, came to be living in AOL's Palo Alto campus could well become part of Silicon Valley lore, especially because it highlights the lengths some entrepreneurs will go to make their dreams a reality. And though stories abound these days of startup founders barely old enough to drink swimming in venture capital, far more have to get by on packaged noodles and the good will of friends with extra couches.

Chicago

You hear it all the time, but Simons, now 20, was a mediocre student with little interest in school. That changed one day when his high school chemistry teacher confronted him and demanded to know what she could do to get him interested.

"I was stumped," Simons writes on the About Us page of his startup, ClassConnect. "She didn't ask me to try harder, she didn't ask me to stay after for help or study more -- she asked me to figure out how she could grab my interest. No one had ever bothered to ask me that before. A few moments later I replied, 'let's get everyone working together on computers -- I'll even build the software for us to use.'" His life as an entrepreneur had begun.

He wanted to get straight into the thick of it, so after high school, and a short period crashing on couches with friends at the University of Illinois, Simons accepted a slot in the inaugural class of Imagine K12, a new Silicon Valley incubator focused entirely on education. His plan? Start a company that builds tools allowing teachers to create and discover lesson plans, and share them with students and teachers.

"Teachers around the U.S. and the world are asked to teach from a checklist," Simons said. "They're asked to teach the exact same thing...and they're all going and creating their own lessons. What we've built is almost a GitHub for teacher lessons. They can fork someone else's lesson plan and use that as a springboard."

Is it ironic that a bad student ended up launching a company that aims to revolutionize education? Simons doesn't think so. "It wasn't that I didn't like school," he said. "I didn't like [the way it was done]. I said, I'm going to take a crack at this. I'm young enough that I can take a crack at some crazy stuff. Ten years from now, maybe I can't be sleeping on people's couches."

Living at AOL

For Simons, "crazy stuff" meant moving to Silicon Valley and trying to get his fledgling company off the ground. But his initial idea wasn't quite working. Imagine K12 was a great place to get mentorship and learn how startups are built, but he and his ClassConnect partners had been given just $20,000 by the incubator, and after the four-month program ended, the money was gone. When his friends left to go back to college, Simons needed another solution.

Screenshot by CNET

Imagine K12 is hosted at AOL's Palo Alto campus, and everyone involved gets a building badge. As it turns out, Simons told CNET, the badges kept working, even after the program ended, giving him ongoing access, along with a face that had become familiar to others who worked there.

"I couldn't afford to live anywhere," Simons recalled. "I started living out of AOL's headquarters."

Contacted for comment, David Temkin, senior vice president of Mail and Mobile for AOL, told CNET, "It was always our intention to facilitate entrepreneurialism in the Palo Alto office -- we just didn't expect it to work so well."

For someone with neither money nor an aversion to sleeping on others' couches, the AOL building had plenty of allure. "They had a gym there with showers," Simons said. "I'd take a shower after work. I was like, 'I could totally work here...They have food upstairs, they have every drink on tap. This would be a sweet place to live.'"

Note that Simons said he would work there. After his four months in the incubator, he was used to toiling away at ClassConnect inside the building, and with other programs, from the Stanford-focused incubator StartX to AOL's own First Floor Labs also taking up space there, there was no shortage of non-AOL employees shuffling in and out all the time. But Simons was intent on launching his startup, so why not find a desk and pound away for 12 to 16 hours a day?

"There were so many people going in and out each day," he said. "They'd say, 'Oh, he just works, here, he's working late every night. Wow, what a hard worker.'"

$30 a month

Having spent several months legitimately working in the building, often quite late, Simons had noticed that although there were security guards with nightly rounds, there were at least three couches that seemed outside those patrols. Plus, they looked fairly comfortable. He claimed them.

This was his routine: He'd work until midnight or later, and then fall asleep around 2 a.m. on one of the couches. At 7 a.m. -- and no later than 8 a.m. so he'd be safely out of his field bed before anyone else arrived -- he'd wake up, go down to the gym for a workout and a shower, and then go back upstairs and scarf a breakfast of cereal and water or Coke. Then he'd work all day, finally waiting until everyone else in the building had gone home before returning to one of his three favored couches.

"I got a really good work ethic," he said, "and I got in shape, since I had to work out every morning."

But the real point was that he was spending next to nothing. The first month, he spent just $30, mainly on the occasional trip to McDonald's or for "random food expenditures when I got sick of eating ramen and cereal. I could have not spent a dollar, but I was going crazy."

Then, of course, there was Thanksgiving. That Thursday, to splurge, he grabbed dinner at a local Boston Market.

"It was a game I was playing," he said. "What is the minimum amount of money I can spend each day to stay alive. You do some crazy things."

Some of those crazy things included getting by with the barest of wardrobes. But because he had access to the building gym, he kept everything other than the clothes on his back and his computer there. "I only had maybe five to ten T-shirts, a pair of jeans, and a pair of shorts," he said, "so it all fit in one locker. [Plus] they had their own laundromat there, so I'd wash my clothes there."

Evasion

Simons could probably have crashed elsewhere, but he wanted to see how long he could make the AOL squatting work. Some friends knew what he was doing, and they thought it was funny. But no one helped him, other than a couple buddies who discussed strategies with him on how to evade security.

"Honestly (though), I didn't think they were going to catch on," Simons said. "I had no indicators that they even cared about that...After the first month, I was like, 'This has worked so far, but this probably isn't sustainable,' so I made sure my friends were OK with" me eventually crashing on their couches.

And then came that fateful morning with the 6 a.m. yelling. "One of the guys who manages the building came in at like 5 or 6 in the morning," Simons lamented, "and he scoured the entire place to find me. And he ripped me a new one. He was pissed that I was treating it like a dorm. Which was reasonable."

Ever the entrepreneur

Though the security guard was angry, he knew that Simons was part of Imagine K12. So no one called the police. He lost his badge, but he still had access to the incubator, and continues to go to the AOL building for meetings to this day. But he treads carefully. "When I'm there, I beeline for the Imagine K12 office," he said, "and when I'm done, I beeline straight for the door."

After moving out of the AOL building, things began looking up financially. Based on the strength of what he'd built for ClassConnect, especially after pivoting and focusing solely on letting teachers share lesson plans, Simons said he was able to score $50,000 in seed funding from Ulu Ventures and Silicon Valley VC Paul Sherer.

"I was aware" of Simons living at AOL, Clint Korver of Ulu Ventures told CNET. "Tenacity and commitment are key attributes of a great entrepreneur. Eric has these in spades as demonstrated by his willingness to do whatever it takes to get his company off the ground."

Now, Simons said, he's looking to raise an additional $500,000.

But one thing the initial $50,000 got for him is a rental house in Palo Alto. It's also made it possible for him to hire an engineer and a couple of interns for ClassConnect, all of whom will share the new pad.

But being the consummate entrepreneur, he decided to use the house to raise extra cash. One of the bedrooms has two bunk beds, so Simons turned the place into a hacker house by renting them out on Airbnb, and trying to make a couple grand a month to help with the rent.

So is Simons just a kid with a particularly honed entrepreneurial spirit?

"Yeah, save money whenever possible, and use all the resources you can," he said. "And don't die. That's basically my motto."

Update 9:31 a.m. PT: This story has been updated with a response from AOL.