Only three got back to him. And one of those was in Long Island, close to where he grew up.

So he cold-emailed and called more than 2,000 facilities across the country.

For years, Peck had closely followed the rise of telemedicine, a technology that connects doctors and patients via phone, messaging or video. It occurred to him that this product, which is primarily used by consumers via a mobile app, was sorely lacking at nursing homes.

All of that proved to be invaluable knowledge to get Peck's start-up, Call9, off the ground.

In return for the lodging, Peck treated the sickest residents, and got time with the nursing home's busy staff so he could better understand their needs. That meant coffee runs with the administrator, or errands with the chief executive. When he needed a shower, Peck — who was 35 at the time — would drive to his parents' home, which happened to be nearby.

Dr. Timothy Peck instead moved from Silicon Valley into a nursing home in Long Island, New York. For three months in 2015, Peck, a Harvard-trained physician, lived in a cot in the conference room of Central Island Healthcare.

Most technology entrepreneurs get their new ventures off the ground by relocating to Silicon Valley.

It was ideal timing. For about five years, regulators had been penalizing nursing homes for sending patients back to the hospital within 30 days. These costly readmissions were viewed by some policymakers as an indication that the facility wasn't properly caring for its residents.

Meanwhile, some nursing homes, including Central Island, were finding that their residents sent over from local hospitals were older, sicker and higher-risk than ever before. The hospitals were also under pressure from the insurers to reduce lengths of stays.

Recent research conducted by the Centers for Medicare and Medicaid from data collected in 2005 found that approximately 45 percent of hospital admissions via nursing homes could have been avoided, accounting for $2.6 billion in Medicare expenditures. Call9 estimates that the number is far higher today.

Central Island couldn't staff up quickly enough to treat or triage these chronically ill patients, so they often got sent back to the hospital unnecessarily.

"I was banging my head against the wall trying to figure out how to solve this problem," said Michael Ostreicher, owner of the 200-bed facility.

And that's when he saw a note from Peck via his website's contact form, offering to solve his problem.

Ostreicher knew it would be a major risk on his part to give this young doctor a chance, as telemedicine seemed so unproven. He was most concerned that his residents wouldn't get the best treatment, as well as the potential liability that comes from bad medical advice.

So he made a deal with Peck.

"I told Tim [Peck] that if he stayed in my building every night until I was comfortable with this time, we'd give him a shot," recalled Ostreicher. Peck agreed, as long as he could fly back to California every week or two to attend events at Y Combinator, the start-up accelerator program in which Call9 was enrolled.

The first patient that Peck treated had diabetes. Peck ran some tests and sent him to an ambulance. By the time he got to a hospital, the patient's lungs were filling up with fluid.

"He saved that patient's life," said Ostreicher.

After that experience, Peck was able to build up a rapport with the nursing home's residents and staff. Peck was able to see potential opportunities for patients to get the care they needed without an expensive emergency room visit, such as sending them to offsite facilities to get scans and MRIs.

He also retrofitted a medical cart at the nursing home to handle telemedicine consultations.

There's an iPad and iPhone, which the nurses can use to reach a Call9 doctor — all of whom are employed by the company, and not consultants. It also includes equipment that nursing homes haven't historically used, like portable electrocardiograms to detect abnormal heart rhythms, bedside lab tests, and sonograms.