A company creating an “artificial pancreas” for diabetics this week became the first startup to raise $1 million using new type of online stock sale open to the public at large.

Beta Bionics, a startup created by Boston University biomedical engineer Ed Damiano, hit the benchmark Wednesday night after 775 members of the public put up an average of $1,300 each to back its idea for a new kind of pacemaker for diabetics.

The company sold shares on the crowdfunding portal Wefunder, which along with sites like StartEngine and Flashfunders, is taking advantage of securities regulations that since May have let private companies easily sell shares directly to the public, not only professional investors.

Beta Bionics could become a test case for crowdfunding and the tech industry’s position that the public should be able to invest in risky startups. Companies raising funds using the new rules include Legion M, “the first Hollywood studio owned by fans,” a brewery in Texas, and a company developing novelty genetically modified organisms.

The new process, known as “regulation crowdfunding,” represents the latest easing of securities laws set in motion by the JOBS Act of 2012 and is meant to modernize investing.

A prototype of a bionic pancreas, the iLet, developed at Boston University.

The artificial pancreas technology was developed by Damiano, whose teenage son has type 1 diabetes and has to inject himself with insulin or risk going into a diabetic coma. While some diabetics already use implanted sensors to read levels of glucose in their blood, Beta Bionics’s device, called the iLet, would also automatically pump insulin into the body when needed, creating a hands-off system.

Beta Bionics opted for the crowdfunding route because it is a “public benefit corporation,” meaning the company’s charter is to act in the best interests of people with type 1 diabetes, including at the expense of short-term profits. That meant it was looking for investors motivated by idealism or who have been affected by type 1 diabetes—which, if managed poorly, can peel years off a person’s life.

Many investors turned out to be scientists or people involved with diabetes research, like Gabriel Smolarz, a clinical assistant professor of medicine at Rutgers University’s Robert Wood Johnson Medical School. Smolarz has two nephews and a sister-in-law with type 1 diabetes. "In my mind, it’s akin to a self-driving car,” he says. “It sounds great—a lot of potential, you’re eliminating human error—but at the same time you’re eliminating human control."

Michelle Faulkner, who works at a Boston public relations firm that represents Wefunder, also invested, buying $1,000 in shares. She says her fiancé suffered diabetes-related kidney failure and then a fatal heart attack two years ago at the age of 46. “He had an outdoor job, he was an electrician,” says Faulkner. “He didn’t want to carry his meter around with him—he didn’t feel it was practical. He tried to do it on his own, based on how he was feeling, and that just doesn’t work. It’s not the kind of disease you can handle using your gut feel.”

Nicholas Tommarello, cofounder and CEO of Wefunder, estimated that since May, private companies have raised more than $5 million under the new crowdfunding rules. That’s a fairly slow start for the idea, although Tommarello notes that about 29 percent of investors have invested just the $100 minimum.

“The idea is having lots of little people making small investments, as opposed to large investments made by the traditional financial infrastructure,” says Marc A. Leaf, a law partner at Drinker, Biddle, and Reath who previously served on the executive staff of the Securities and Exchange Commission.

He says it remains to be seen whether the collective instincts of the public will prove better at picking winners than professional technology investors. “We can query whether in fact crowds are wise,” says Leaf.

Bioengineer Edward Damiano developed an “artificial pancreas” after his son, David, was diagnosed with type 1 diabetes.

By raising $1 million, Beta Bionics hit the maximum amount companies are legally able to raise with regulation crowdfunding in a single year. Leaf, who recently analyzed 50 companies seeking crowdfunding, says he believes it is the first company to have done so.

Beta Bionics had a boost because the drug company Eli Lilly, which sells insulin, previously purchased a 5 percent stake for $5 million. Lilly’s investment served to set the overall value of the startup at $100 million, significantly higher than most companies seeking to sell shares through crowdfunding.

Beta Bionics has already tested prototypes in volunteers and plans to start a larger trial of the iLet in March 2017. Initially, the device will only dispense insulin, which acts as a brake on blood sugar. A future model will deliver both insulin and glucagon, a second hormone the body needs when glucose levels are too low, for instance between meals.

The company will be competing with other artificial pancreases under development, including one created by Medtronic that could be commercialized next year.

And that’s not the only risk that investors of Beta Bionics face. In order to pay for its studies, it’s also counting on winning a $15 million grant from the National Institutes of Health. But there’s no guarantee that will happen. “We are blazing a new trail here, and as with any endeavor that attempts to do so, there are a few things that can go wrong along the way,” the company told prospective investors.