SAN FRANCISCO—Dressed in matching yellow scrubs from the nearby Alameda County Jail, Jon Mills looked resigned to his fate. After taking a plea deal on two felony counts of wire fraud, the young former startup CEO appeared in federal court Tuesday afternoon for sentencing.

Mills had moved to California five years ago with a dream to hit it big in Silicon Valley. The company he founded, Motionloft, uses small sensors to perform analytics on in-store foot traffic. Everything worked. The company continues to succeed, and celebrity venture capitalist Mark Cuban remains its sole investor.

But that success wasn't enough. In early 2013, Mills told at least five people that if they gave him relatively small amounts of money, they would own stakes in the company. He claimed that a Cisco acquisition worth hundreds of millions of dollars was supposedly imminent, so Mills and all Motionloft shareholders would stand to make a tidy profit. In reality, Mills knew the deal didn't exist.

One of his former “investors” eventually caught on and told the FBI, which led Mills to today and those federal charges of wire fraud and money laundering. Last fall he formally pleaded guilty to wire fraud—the four counts of money laundering were dropped—and he admitted to cheating potential investors out of more than $765,000.

On Tuesday, United States District Court Judge Richard Seeborg heard statements from both the federal prosecutor and Mills' defense attorney. The judge acted swiftly.

"It's a serious swindle and it involved his embarking on what appears to be a prolonged and thought-out plan to defraud the victims, and some were his friends that had trust in him," Judge Seeborg said. "It didn't start out as a swindle from the get-go, but I don't think that gets Mr. Mills very far because it became unadulterated greed."

The judge sentenced the 31-year-old former CEO to two years in federal prison. He also immediately ordered Mills to be remanded to the Bureau of Prisons, denying him the chance to self-surrender.

Since the start of his schemes, Mills has repaid some of the money. Still, the businessman owes more than $572,000 to victims. In addition to the prison time and the monetary restitution, Mills will now pay the government $6,000 in fines. He'll live on supervised release for three years after leaving prison. Plus, the judge also recommended him—as did his attorney—for the Residential Drug Abuse Program run inside federal prisons.

"Something is wrong here," Harris Bruce Taback, Mills' attorney, said in court. "This compass that is in him needs to be reset and counseling is going to be a great help to him."

The perception exists that all young Silicon Valley CEOs have to be hustlers to some degree or another, but this level of blatant criminal fraud remains rare. How did Mills go from one of many to the one in the jumpsuit?

First, do no harm

When Mills arrived in California, he hoped to use sensor devices as a way to perform what eventually was dubbed "real-time analytics for vehicle and pedestrian traffic in your city."

A 2011 version of the company’s website described it this way:

Motionloft’s sensor hardware is neatly tucked into an unobtrusive box about the size of a small dictionary. It requires minimal installation, making it simple to use and low cost to implement in virtually every industry. Using cloud technology, our sensors stream the data into our user-friendly dashboard, which you can monitor every network we have available to you in real-time.

The company claimed CVS Pharmacy, Saks Fifth Avenue, Naked Pizza, real estate giant Colliers, and Cushman & Wakefield as clients by mid-2012. A specific client list no longer appears on the Motionloft site, but the company still claims a significant footprint.

Fast Company profiled Motionloft in April 2012, and the magazine outlined a real-world implementation of the company's product. A sausage lunch spot in downtown San Francisco called Showdogs apparently determined its busiest hour (between 12pm and 1pm) by using Motionloft sensors.

"This can help businesses nail the location they should be in. It makes sure that businesses aren’t put out of place," Mills told the magazine at the time. "That’s better for everybody: The businesses get more customers and the customers get the kinds of businesses they need in places that make sense."

As Motionloft’s profile and business continued to grow throughout 2012 and 2013, Mills began to talk up the company to numerous people, everyone from friends of friends to even his own doctor. The doctor, referred to as "JD" in the FBI affidavit written by Special Agent Brian Weber, lived in the Bay Area and specialized in house calls. JD met Mills in September 2011, and he continued to serve as Mills' physician for over two years. (He did not respond to Ars’ repeated requests for comment.)

Business discussions between the two appeared to start off innocuously enough. In November 2013, Mills texted JD: "I set aside some shares for you a long time ago but wasn’t sure I could get them to you. ... Are you interested?"

JD wrote back: "Really? Of course. That was awfully sweet of you."