And without further ado, let me introduce Jay Legorio. So, Jay is a software engineer, independent security researcher, and he's been building computers and networks and writing code for pretty much his entire life. He got his Bachelor of Science in Computer Science from UMBC, Go Retrievers. In 2008, a Master's in Engineering from the Naval Postgraduate School. Yeah, that's awesome. In 2015. So, without further ado, Jay Legorio. All right. Hi, DEF CON. My name is Jay Legorio and I'm gonna talk about do-it-yourself artificial pancreases and how you can build one of your own. So, I'll talk a little bit about who I am, not as much because we've already gone over that. Uh, an introduction to diabetes, let's all get on the same page. Uh, hardware, software and safety and the solutions, uh, that we will engineer to achieve all of those. Uh, iterative improvements, uh, developed over several years. Uh, a live demo, uh, which is starting, uh, starting at least now. Uh, we'll see the results at the end. Uh, something I like to call exponential growth and, uh, and then I will take questions. Uh, so we talked a little about who I am. Uh, I also have some, uh, some various SANS certs, uh, and I'm a developer. I'm an IT consultant and I'm a private investigator licensed out of DC. And, uh, and as a developer, I've always solved my, uh, my problems with software. So, uh, when I first got this diagnosis, I was given a piece of paper and a table and they said, use this to track your information. And that sounded ridiculous. So, uh, I wrote a web app, uh, and it was great. And I thought, oh, look at that. I'm unique. It's the intersection of this thing, uh, and computer science. And it turns out, uh, you are unique just like everybody else, uh, because this is Scott Hanselman. He's a developer evangelist at Microsoft. And he says the first thing every techie does once they've been diagnosed is they try to solve the problem with software or hardware. So I'm no, I'm not unique. So let's talk about this disease. We'll all get on the same page. Uh, diabetes affects nearly 200 million people worldwide. And there are two types of them. The one which we'll talk about today is genetic. It's type 1 and it's a deficiency in the pancreas to properly produce insulin. So you have to get it somewhere else. And type 2 is also a deficiency, but it is in the rest of the body's ability to absorb that insulin. We're not talking about that today. Uh, despite having a similar name, uh, to type 1, it is actually very different. Um, so again, we're not talking about type 2 diabetes. Uh, and all of us with this disease have heard the meme, there will be a cure in five years. And certainly 10 years ago at a, at a hospital bedside, that is what the doctor told me, uh, nearly immediately. And five years later and five years after that, there is still no cure. So insulin is a hormone required to sustain human life and people with it must get it from somewhere else. And there are two types. There's long acting that takes your, uh, your blood sugar and it kind of keeps it in check over the course of 12 or 14, or sorry, 12 or 24 hours. And there's short acting, which is for things, uh, like meals so that you can counteract, uh, the effect of carbohydrates on your body. So you administer insulin with a complex formula, uh, taking into account, because this is all very, uh, pre-existing insulin levels and adrenaline and your insulin sensitivity. Like I said, it's all very easy. Uh, and you straddle this tenuous line, uh, between going too far high and too far low. So what's normal for most of you, you're going to maintain and ride pretty much right at a hundred, uh, the rest of your lives. And that's very good because too high, uh, if you're, if your levels are too high or remain very high for a long time, uh, you can have a, uh, a major impact on taking years off your life. Uh, in addition, it can cause strokes, seizures, organ failure, brain damage, and death over a sustained period. But, uh, you think, okay, well, we'll just go low. Well, low is even worse. Uh, after you, uh, uh, spend, let's say tens of minutes progressing through anxiety, tremors, sweating, uh, dizziness, confusion, and heart palpitations, right at about 35, you pass out. Uh, and that is when you will, you, uh, are much more likely to die. This is the very acute way as opposed to the long-term way that people die of this disease. Uh, and some people are hypo unaware, so they don't even feel those symptoms when they're crashing down. Uh, that makes the technology we're going to talk about today, uh, a real life requirement, uh, for those sorts of people. And it's a difficult balance to maintain consistently. We talked about this equation, uh, and it's for the most part accurate ish because certain things we can't measure. We can't measure, uh, sickness. I don't have four six today. Uh, you can't measure adrenaline. Uh, mine is surging because I'm up in front of all of you and I have no idea what that means. Uh, you also can't really measure exercise. Sure, it takes twice the amount of work to go two miles versus one, but there's no real way to quantify that, uh, as it impacts this disease. Uh, you also don't know when the carbohydrates that you're eating are going to hit your system. So if you dose a bunch of insulin and the carbs don't, don't take effect, your insulin levels are going to crash your blood sugar down before the food even catches up. Uh, it also goes the other way more often than not, but you can't predict that because even, uh, things that you do commonly and regularly and are very, uh, easily predictable, they can come right out of left field, uh, and hit you when you don't expect it. Your insulin sensitivity changes over time, over a period of weeks, and is sometimes different throughout the day. Uh, and finally, you have to maintain safety at night. You don't get to sleep through this. Uh, it's something that you pay attention to 24 seven. So this is living with it, but how do we measure how well we're doing? The A1C blood test is a, it, uh, measures a chemical that is, uh, related to your glucose with an impact of about three months. Uh, in aggregate, it's a good approximation of how, uh, well you've been maintaining control of your blood sugar. Uh, and you need to, and if you maintain control of that, of your blood sugar, you'll get a good A1C test. Normal people, uh, should be about five to six. If you're diabetic, it's probably higher than six. And after seven, it, uh, that's when it starts to indicate that you're not managing your care very well. Uh, your blood sugar should not fluctuate wildly during sleep. So as long as you go to bed in a good state, uh, you will probably add good time, so to speak, to your A1C. Now there does exist some technology to make it easier to maintain control of your, of your blood sugar, but it largely goes towards eating, easing burdens. None of this stuff makes decision-making, uh, uh, none of this stuff takes a decision-making role in management of the disease. So we replace injections, multiple injections, with insulin pumps. Uh, I mentioned there were two types of insulin. With an insulin pump, it very slowly microdoses, and not the Silicon Valley microdose, uh, it slowly microdoses insulin over the course of the day to take that long-acting effect, uh, and use short-acting insulin, uh, to, to achieve the same effect. And you're not, uh, you're not stabbing yourself all over the, uh, all over your body all through the day. You put it in one day and maybe about three days later, uh, you change it all up. Uh, we also have a continuous glucose monitor, and this takes the place, uh, or is augmented by, uh, finger sticks. And that's exactly the thing that all of you know what I say, what, what I mean when I say you prick your finger, put the blood in the meter, and, and all that kind of thing. Uh, the sensors, uh, they vary, uh, de, uh, depending on the model. Uh, they can stay in for seven days, 10 days, 14 days, it all depends. But generally, they all hold to this, this one thing where, uh, you get a reading every five minutes, um, which is good because then you can expose things like trends. It's not this point in time conte- uh, context-less, uh, finger stick that doesn't tell you as much as you really want to know. So, uh, let's talk about some tips. You don't get to have bedtime snacks because you don't know what it's going to do. Uh, you intentionally go to bed on the higher end of the scale because the insulin pump is unthinking, and it will slowly dose that insulin, and you don't want to wake up too low, and you don't want your, your continuous glucose monitor to set off an alarm. Uh, and, uh, every meal, even the ones that are usually predictable, can become an hours-long battle to get back to normal. And this is just how it works. This is true mainly for everybody. Uh, and a rule of thumb, if you wake up in a bad state, there really is no recovery during the day. You're always going to work to fight your numbers down, uh, or bring them up throughout the day. And finally, I want to leave the intro with a, with, uh, a graph of how hard this all is. This is from a study called the Effect of Diabetes on Outcomes of Hyperglycemia in a Mixed Medical Surgery Intensive Care Unit. It's from May of 2001, and if we define in range as between 80 to 180, uh, these folks in an ICU were only in range about 65% of the time. How hard is it when we're in an ICU and doctors can't even keep this thing in line? So that's what the rest of us live with. Uh, so now we'll talk about hardware. We need to develop a solution that takes data from the CGM, processes it with what it already knows about our bodies and its current state, predicts future effects, uh, based on the existing state, any proposed changes like dosing insulin or eating, uh, and how the medicine actually works, and finally delivers a command to an insulin pump that's something other than that regular background, uh, insulin. And this requires us to, to overcome several technical challenges. We need something small and low power. Uh, we need a visualization solution because this thing needs to be monitored. And, uh, we need to collect blood sugar readings from an FDA-certified CGM system. And finally, we need to query and control an FDA-certified insulin pump. And the reason FDA certification is important here, uh, is because the quality of the measurements that you get will directly impact the effect on your body. Uh, we're, many of us are developers, we understand garbage in, garbage out. You need something that is giving you good data and then you need an insulin pump that can, that can accurately take action. If you say dose one unit, you don't want it to be 0.9 or 1.1 or maybe it's 5 today. You need something that is absolutely reliable. So, nowadays, this is actually really easy. I think it's easier than it was 10 years ago. Uh, the Raspberry Pi and the Edison are ultra-portable. You can get them anywhere, although the, uh, the Edison is discontinued now. Uh, and it's great to run our code on. We can, we can get these anywhere. Uh, they each have built-in Bluetooth and Wi-Fi, so they're eminently net, uh, networkable. You can, you can tell it about all of your, your different Wi-Fi access points or you can tether it to your phone when you're out on the go. And finally, uh, some, because Bluetooth is built-in, you can collect CGM data directly from the transmitter that's attached to you, if it supports that. And the solution we're talking about today does. Uh, and if not, you can plug the receiver, uh, into the device, uh, and because they both support USB on the go. So, you can, you can download your data directly from that. So, we talked about collecting CGM directly, but the insulin pump we're going to talk about is, uh, it's a 900 megahertz, uh, radio. It's in the ISM band. Uh, and the open source hardware community stepped up for us and developed the Explorer board for the Edison and the Explorer hat for Raspberry Pi. Now, they're marketed as random 900 megahertz radios that anybody can do anything with. And that's true. You can, but this was made for this purpose, uh, and we really appreciate that. Now, I mentioned that the, uh, the protocol was proprietary. It was reverse engineered over a period of years, uh, by someone known, known as Ben West. Uh, none of this would be possible without his work. Uh, so it's, uh, uh, we really appreciate it. Now, older insulin pumps have wireless connectivity and the manufacturers allowed you to remotely control them. Uh, not from very far away, but you could still remotely control them. And when they found out about this, uh, the fact that you could remotely control them, thanks to a Black Hat 2013, uh, talk, they significantly limited how that functionality can be used. So in newer pumps, you can still query, uh, for the state of the system, but you can no longer remotely dose insulin. You have to find out of warranty pumps. You have to find them anywhere that you can, uh, and then we'll use our custom hardware and software to talk to them. So older devices, uh, are already hard to acquire. You have to scour eBay, Craigslist, Mercari, uh, this website called MedWow. Uh, and because no one can resist the chance to take advantage of an already disadvantaged community, there was price gouging. So you'd think these older out of warranty pumps would be cheap because they are, because they are older and well used. Uh, and the prices on these things that people wanted, uh, people who weren't even interested in participating in this or weren't diabetic skyrocketed. So that was, uh, that was really fun. So let's talk about software and safety because safety is a pretty critical factor here. Our visualization stack is going to be built on Linux, Node and Go, Mongo, Python and Bash, and it's called NightScout. It is purpose built, uh, to visualize the current state of a diabetic system, uh, as well as dump, as, as well as serve as a holding place for historical data so that you can bring, uh, you can bring reports to your doctor so that you're, you're not giving them kind of, uh, lack of context for how you've been, you've been taking care of yourself. Now everyone builds their own NightScout instance and it fits well on the free tiers. Uh, I have a guide out where you can install it on private infrastructure. If you choose to do that, I don't really like having stuff in the cloud. So this works, uh, on a server in my basement. And NightScout is great for a point in time representation, representation of how things are now. And again, you can generate reports to bring to your medical, uh, your medical appointments. So, the solution that does all of the heavy lifting is called the Open Artificial Pancreas System or OpenAPS. And it is built on, uh, much the same group of, of, uh, technologies, Node, Python, uh, and Bash. And it runs on Linux. Uh, so again, this fits well with our Raspberry Pis and our Intel Edisons. And it's designed to acquire CGM data, process it using an algorithm, uh, and deliver a dosage command to an insulin pump, which checks all the boxes, uh, for the things that we talked about what we needed at the beginning. Now, more than 1,440 people have sort of raised their hand and said, yes, I'm using this. But we know that there are more people than that, uh, who are using it. Um, because it, it is, uh, uh, it's not required to get permission or anything like that. Uh, so, uh, using those numbers, about 7, uh, 13.7 million person hours, uh, of algorithm use, uh, have been, uh, uh, have been achieved. And, and so far, for the people who are using CGM certified, uh, uh, I'm sorry, FDA certified CGMs and FDA certified pumps, no one has gone to the hospital. Um, so a person can only be expected to do that equation that we talked about really several times per day. Uh, and the fact that there are so many unknowns in this equation, it's a, it's a, it's a wonder anybody does it right at all. Uh, but OpenAPS can process that data every five minutes because that's when you get a glucose reading. And so that's about 300 times per day that you, the patient, are not having to deal with the stress of this stuff. And more importantly, it works when you're sleeping, which is awesome. So it, because it is more aware of, of many things that the human cannot be aware of, uh, it makes better decisions. So it knows, uh, the manufacturer provided, uh, equation that says, uh, when the insulin will take effect and when it will start to taper off. And it can use that information to make a better decision to say, okay, well, his, his blood sugar is rising a little high, but he already has this much on. And according to this equation, well, I'll add a little more or I won't, which is, uh, which is really good. And I mentioned that your insulin sensitivity varies over time. So Auto-Tune will tune the algorithm to carbs and insulin over weeks. Uh, and Auto-Sensitivity will tune the algorithm, uh, to you over, uh, several days. This is a very person-centric disease. So you need person-centric, uh, uh, applications here and it gives you advanced warning. So if, if it knows, because it, again, it knows how the insulin works, uh, to a mathematical level, uh, it can send you a notification to your phone and say, Hey, you need to eat carbs, uh, because otherwise in about 15 minutes or however you configure it, uh, you're going to have a low. Uh, so after this feature was implemented, uh, whenever, uh, uh, whenever it would tell me that I needed to eat carbs, you're going to experience a low, uh, I didn't get that low, which was great. That was really helpful. So let's talk, I already hinted at it, but let's talk about the first benefit you get with this system. Someone running on manual mode, uh, can normally be expected to wake up at least once or twice every night to alarms cause, uh, that require your action. Uh, again, you don't get to sleep through this, but OpenAPS takes control of this all night long. And sleep is one particular area of your life, uh, that improves dramatically almost immediately. So, uh, after diagnosis and before starting this, uh, I went from getting no more than six hours of uninterrupted sleep at a time, uh, to the first day I slept 10 hours. And when I woke up, I was exactly where I wanted to be. And it was, it was nothing short of incredible. I was a very tired person. So a sleeping patient isn't eating. It's also easier for the, uh, for the system to maintain them within the range that you've defined. Uh, and good time and range, especially at night, improves your A1C without any work on your part. Uh, you're not struggling between the decision of, I'm starving, but still have high blood sugar and need to wait to eat. You're generally not eating. So this is the only factor that, uh, uh, that really comes into it. Uh, and I, I don't want you to think that this is just my experience talking about how life changing the sleep is. Uh, this is generally the first thing we hear from people is that the sleep is amazing. This person changed their sensor and immediately went back to bed. Uh, and everything just worked. It just worked and it was great. So we have been building the airplane while we've been flying it and manufacturers don't really get that luxury. And safety is a critical factor in the way that changes and features are implemented because we don't want to send somebody to the hospital. So there are several checks and double checks before it makes an ins, uh, an insulin decision. Uh, there are fallback behaviors defined. So should, uh, I be away, uh, should the system be away from the insulin pump for hypothetically 30 minutes, uh, there's not much difference between what 30 minutes with this system would have, would have caused and what 30 minutes without it. And after that 30 minutes, the pump reverts to its, uh, its normal, just background insulin doing things manually. Uh, and features that have impact on the algorithm are scrutinized heavily by a core team of developers. And I don't want you to think that means, that means me saying, uh, oh, it's open source. So obviously there are all eyes on it. Uh, you know, like we used to say about open SSL. Uh, but there are, there are people who are, who are dedicated to that one part of the algorithm. There are no changes that are going to go into that without their say so. Uh, now commands are delivered, uh, oh, I explained this already. So when, uh, when the pump is out of range of the system, uh, it will default back to factory behavior, which is great. Uh, and during sleep, the manufacturing provides CGM, which will alarm, uh, it can be used as a fallback. So let's say, uh, Linux kills the, the open APS process for some reason, who knows why? Uh, and it stops working. Well, if I start to go too high or too low while I'm asleep, this thing is independent. It can still, you know, sound an alarm, uh, and cause me to wake up and then take care of all this stuff. So sleeping just one benefit to the, the patient. We also discovered something that kind of should have been a little intuitive at the beginning. So normal routines operate by making drastic changes, uh, and you can't undo them. You cannot undo, undose insulin and you can't take back the cheeseburger that you just ate. I guess you can, but that's, that's gross. Um, actually just didn't think of that until now. So, uh, so one indirect safety factor that was discovered through use of this, it really makes sense when you think it through. You make small changes every five minutes and then after just five more minutes, correct anything that may be out of place or that needs to be done. So if you have a sudden rapid rise, you add more insulin. And if you have a sudden drop, you suspend delivery. And this is key during meals. Don't take the entire insulin dose because there is a nonzero chance that you're going to wind up, uh, on the floor. So open APS actually mimics the pancreas is normal function by slowly dosing insulin as the body processes carbohydrates and it keeps the patient's blood sugar from extremes. So lesser amounts of insulin in the system, in the person's system at any given time reduces the likelihood that they experience a blood sugar drop at all. So let's talk about iterative improvements. Um, I've made several implementations over the last few years. I'm going to hold these up. Some of them are large. They're, they have this big shave kit bag and you had to put it in a backpack. Uh, some of them are still a little bulky, but much smaller. And some of them are very, very tiny. Uh, and the one that I use now fits in my pocket and it, it, it's no bigger than my wallet. Uh, it doesn't feel obtrusive. So each iteration and choice of component over the years reduced the size and improved portability and battery life. And again, we're building the plane while we fly it. You can make incremental improvements in these things as you go. So some contributions I've made to these projects. Uh, somebody implemented an interactive setup script, uh, before you really had to, uh, uh, do things in a certain order in the right way or the whole system just would fall over, uh, fall out from under itself. Um, somebody dreamed up this interactive script and it asks you some questions about the equipment you're using, uh, and you just tell it. And then later on you can use command line switches when you want to update your software. So I've, uh, I've tried to increase flexibility around connectivity, specifically, uh, with Bluetooth tethering to, uh, to phones so that when, uh, you have flaky signal, like you're in, uh, an underground tunnel, uh, like on a train or something, uh, the connection kind of flapping there doesn't impact the communication with the server. Uh, and I've also added some FDA, an, an FDA certified device. Um, this one here, it uses this receiver, um, to, uh, to dump the data into the system, but, uh, it broke and so I needed to get a replacement. But the replacement that they sent, that they sent me does not share, uh, its data in exactly the same format. So I kind of had to bump around to add compatibility with the newer devices, uh, and committed all that stuff up. So the systems work without a con, uh, connection to the internet when one isn't available. And when you get back to civilization, uh, connect, the connection returns and it dumps all its data into NightScout. So you can, and people absolutely do, take these remote places to go, uh, hiking and all that kind of stuff. You're all, you're all good to do it. And as long as it gets time on startup, because, uh, some of you may know, none of these things have a battery for the real time clock. Uh, so when it starts up, it starts up with a new date. So as long as it can get NTP time, uh, it doesn't need to be connected, uh, continuously. And even if it can't get NTP time, say when you accidentally turn it off, when you're on an airplane, you can SSH into your artificial pancreas and tell it what time it is, uh, on the command line. So here are some images of the, uh, of these a little more close up. Um, this is a 26 amp hour battery. Uh, this is the receiver that I told you about. Uh, this is, this is an antenna that you could get from the manufacturer so that it would communicate with us, with a web service that they run. And the web service would talk to this thing through, I swear to God, JNI and Java. Uh, uh, and it's, it's something that I still to this day don't know whether to, to, uh, uh, attribute to malice or incompetence. After one foot or two feet away, this thing doesn't work. These things made by randoms on the internet work like 10 feet away. I don't, I don't understand it. Uh, and this is a Raspberry Pi 2. And something that I, I actually enjoyed doing, uh, in addition to all the straps that are inside so that things don't bump around, uh, I, uh, on this side, I got these female, uh, female to male, uh, short USB cables to plug into the dual charging ports of the battery. And instead of digging that battery out at the end of every day and plugging stuff in, you just plug the, the bag into that. And I thought that was a nice touch. That was very convenient. Uh, so this is what, uh, what these systems look like. Uh, this one, um, this one here, that's this one, is, uh, is an Intel Edison with the board under it and it does USB on the go. So you, uh, connect this onto that and it's still kind of bulky. And also you do need a USB battery because you have to feed five volts to, uh, to the USB on the, on the go device. So even though it has a lithium polymer battery, uh, it's not enough if you want to connect to, uh, the receiver. But this one, which is, uh, which is in here, this is a, uh, a Raspberry Pi zero with the board on top and it's a lithium battery only because it's pulling, uh, the blood glucose meters, uh, um, measurements directly off the Bluetooth transmitter. Uh, and I added a, a kill switch and, and the nice thing about this is it has a screen. So even if you don't have night scout or access to any of that stuff, you're not guessing, uh, to see sort of what the, what the decision loop is doing. And the last thing which, uh, which I characterize is the difference between having your speedometer in your glove compartment or your blood sugar in your pocket. Uh, this is a Fitbit with a, with what's called the glance face and it shows you every, really everything that you need to know. It shows how much insulin is active, uh, what carbs are left to be digested, where your number is now, and a little graph to show where it has been, uh, and what the change, that's that zero MGDL, uh, was from the, uh, the prior reading. Now I've mentioned that all of this stuff is out of warranty, but after a breakthrough of literally years in development, uh, this is called the, the Omnipod. Uh, it is manufactured today. It is, uh, it's a tubeless insulin pump. So it sticks to your body. Uh, somebody figured out how to control it. It, uh, it works in the 425 megahertz band. And so what people are doing now is compiling this, uh, this middle screen here. Uh, it's an iPhone app called loop and it sends a Bluetooth via Bluetooth commands to this relay thing. It's called a Riley link, which then spits out the 425 megahertz commands to this thing. So it's everything that I've described with warrantied hardware, which is nuts. Uh, I cannot tell you, uh, the, the Herculean effort it took to figure this thing out. Um, there's proprietary crypto in there. There's a, it, it was nuts. Um, so those people I hope feel very proud. So, uh, I promised you a live demo and really the entire time has been the live demo. Um, so these are, uh, these are live logs from what's going on with OpenAPS right now. So this one, if you notice here, it's taking several, uh, several different ways to predict what my blood sugar may do based on various factors. Uh, let's see, this is towards the tail end of the log. Uh, up at the top, it has decided that it is going to change that background insulin, but it's not going to dose, uh, more, uh, any more insulin, uh, with what's called a bolus. That's when it, uh, you're giving yourself more than that background insulin. And on the right, this is a log from the Bluetooth, uh, receiver. It's, uh, the project is called XstripJS. Uh, and that is live communication, uh, every five minutes with the device whenever it wakes up. And, uh, oh, so this is the beginning of the loop. What it's doing right now is making, uh, prechecks to make sure it can communicate with, uh, with the device. It's seeing what has changed over the last, uh, the last time that the loop ran. And then it's checking to make sure the, the time is correct. And then it's going to refresh what it, uh, what it knows about the system. And that kinda, that kinda takes a minute. So, uh, I was really hoping that we were gonna catch a new number on the other side so you could see that log, uh, go crazy. But, uh, such is not that log. Uh, and the other thing I wanted to show you was NightScout. So, uh, where do we start? So up over, uh, where you see 109, that is my blood sugar right now. It's up five points. The amount of insulin on board is actually negative 0.4. Uh, and I'll explain the reason for that in a minute. The basal is set right at about 1.0 units per minute. And you can see that, uh, that drop down icicle graph. And I haven't really been eating today, so there are no carbs on board. Uh, it shows that the pump has 78 units in it. Uh, the battery is 1.26. Uh, the one thing I'll say about the battery is that normally you get about two weeks with the battery. You get about three days when you're running this thing. Uh, which is fine. It's a triple A battery. It doesn't matter. Um, this right here shows that I, I did a finger prick and this is the trend graph of what my blood sugar has been doing. And the, uh, uh, purple lines right there, those are the predictions about what it is going to do. Uh, and here you can see I've been, uh, on a Vegas diet, uh, kind of spikes. Um, but yeah, I think I got, oh, and, uh, let's see, you can look at more. Uh, oh, this is, uh, uh, bolus right here. So I ate 45 carbs and only took one unit. Uh, if any of you in the audience are familiar with that, that's going to sound like a real underdose. And it was because then over here, open APS kicked in and did the rest. So it spiked a little bit, um, but then it came back down pretty rapidly and landed, uh, without, without too much, uh, without too much trouble right where I wanted it to be. I think I just saw the log tick. Yeah. So that's it, uh, communicating with, uh, with open APS and with the, uh, with the night and with the night scout server there, um, to register a new blood, uh, blood measurement. All right. Live demo. My internet works. That was great. So let's talk results. Two graphs up at the top in 2016, uh, right. I want to say a three month period starting in April. You can see that, uh, for 69% of the time I was in range and about 39, uh, 30% of the time I was high and I didn't have any lows. And there's a reason for that. Uh, after a couple of very scary moments, uh, in consecutive order, uh, I stopped really taking care of myself in terms of how high my blood sugar got. And you can see that here where it says the average of the normal is one 50 and the average of the high is about 200. Uh, that's not great. So, uh, from last week and then three months prior is the lower graph and that's 89% of in range time, 3% of lows. But if you look at the average and the median, those lows aren't that serious when you have something that is, uh, micromanaging, uh, everything that it does every five minutes and a little bit of highs because you're diabetic, you're never going to solve that. And this is just another way to visualize the same thing per hour of the day. Uh, if you notice up at the top, it's largely between one 50 and 200 and down at the bottom, it's largely between 100 and one 50. Uh, and now let's look at a few raw results. Uh, there was no A1C estimate, uh, before 2016 because there was no way to do that. Uh, so, uh, a couple of things that are important. This was diagnosis. Uh, I mentioned that six is a good place for a diabetic person to be and that ain't six. Uh, so that was a hospital visit, uh, and a surprise. Uh, but I quickly got it under control, uh, because, uh, I am also a control freak. And, uh, and right about here was just before those periods of, uh, let's say noncompliance, uh, with keeping your, your numbers down. Uh, and that was, uh, that was due to something that happened at an IKEA and very helpfully, uh, I'm sarcastic, this was the most unhelpful employee I've ever met, uh, at, uh, at MGM, uh, at a DEF CON. Uh, not MGM, at a DEF CON. It was Mandalay at a black hat. Yep. Uh, yeah, simple instructions were very difficult for that person. Um, now here, this is, uh, if I started OpenAPS in April of 2016, uh, that's the difference between, uh, the one right before it, uh, that's a, that's, that's point six. And that was only at night and doing very little work on my part because OpenAPS was taking care of all of that. So, as soon as I got the nights under control, I got an immediate benefit, uh, for, on my A1C. And then continuing forward, uh, now it's down to about six three. And again, I don't do very much work anymore. So, that's my personal change. Let's talk industry change. Previously, these were monolithic systems. One device, one insulin pump, one sensor, none of it's interoperable. Uh, and this thing, uh, it's as expensive as a regular insulin pump, uh, but it doesn't do, uh, it doesn't do anything, uh, really other than freak out. Uh, in fact, 40% of people leave this system, which is supposed to have a very tiny bit of automation, uh, because they can't keep it, uh, they can't keep it working enough, um, to stay in that level of automation. And then it pumps them out to manual mode and then what's the, you know, what's, why do they even have it? Uh, it's not tunable and this is a very person specific disease and it doesn't handle meals for you, which is probably a good 90% of why I love OpenAPS because I'm probably not gonna overdose myself. Uh, so, now the FDA, what they are doing is, uh, is certifying devices separately and making sure that they are interoperable. So, you have discreet CGM pumps, uh, uh, CGM, uh, devices, pumps and algorithms, they get certified themselves and then manufacturers get to make business decisions about which things interoperate. So, uh, the ICGM is the first one, uh, there are alternate controller enabled, that's an insulin pump, which allows an outside entity, uh, to control the insulin pump. The, the smarts don't have to be integrated into the pump itself. Uh, and finally the eye controller, that's the algorithm, that is what OpenAPS is, uh, but there are no certified products yet, uh, we think eventually, uh, very soon there will be. Uh, and plug and play is important, FDA isn't going to get the business of dictating which products, uh, work with, uh, with which other products so long as the qualifications are met. And so none of this would be possible without the people behind the hashtag, we're not waiting. Uh, it was a lot of people that were really tired of 90's garbage tech not handling this, uh, when really that's the goal of technology is to make your life better. We've all been told that there will be a cure in five years, uh, these people were tired of being told that. Uh, one thing that I want to emphasize, this is a group of non-doctors, um, these folks who started this changed an entire field of medicine, uh, and they are not themselves doctors, and I think that's, uh, a huge, uh, a huge good thing. Yeah. Yeah, thank you. So let's talk about exponential growth. Everyone needs insulin, this is a biological fact. And lack of the hormone is not a question of lifestyles or choices, uh, or what this person could have done better. Uh, it is a lightning strike that could happen to any of you, uh, really at any moment. And people will die, it is like water and like air. So when predatory prices are levied, uh, are levied on this drug, it is the financial form of your money or your life, kid. Uh, it's not great. And it's not like, oh, people die of this. Uh, people are dying now and it's 2019. Uh, so just, uh, uh, in Ju- just in June in California, three people under the age of, uh, of 25 died because they did not have access to affordable insulin. This guy died like three days ago because he changed insulin to save for his wedding. Uh, the people that, that use the $25, uh, Walmart insulin as a, uh, something to point to, to say that insulin is, is cheap and available. That's what this guy switched to. I mean, I'm not going to use dog insulin because it's cheaper and it's insulin. Uh, that's basically what this guy had to do. And, uh, and yeah. So I have a graph here of several things that are indexed to overall inflation. That's that black line there. And we're doing great with some things. Uh, so like TVs, that's that bottom line. Like there's never been a good time, a better time, uh, to buy a TV. And then there are things, uh, that are below the line like cell phone service and new cars. Uh, food and beverage and housing is right about at the middle line there. Wages are a little higher, but then other essentials like, uh, like college tuition and childcare and medical care services, they're up way, way high. Uh, and what I don't show you is the completion of that gold bar because that gold bar is 100, uh, 1,175% increase for the same formulation of the same insulin by the same brand, uh, 20 years later. So that's some shit. Uh, I, uh, I kind of subscribe, uh, subscribe to this, uh, this Senator's feeling on this. Uh, Americans, Americans are getting price gouged because our government lets it happen. Uh, other governments don't do that to their citizens. Uh, this is not meant to be a, a political statement or anything like that. Uh, but it's pretty evident that the, uh, the medical, uh, paradigm in the United States is kind of busted. Uh, and this is one, uh, one symptom of that. So I want to take the time to acknowledge, uh, the many people that contribute to these projects. Uh, and I am, uh, I'm not getting, uh, the hundreds, the other hundreds of people that contribute to this. Um, so Ben West, like I said, he's one of the, uh, one of the key players here. Uh, Dana and Scott, they're, they're, um, kind of behind one of the ideas that, that, uh, that produced Night Scout. Scott Hanselman, uh, he's, uh, again, that's the developer evangelist at Microsoft. He's got a huge megaphone. Uh, Xstrip JS, those guys, uh, are the ones that enable you to get the, uh, the Bluetooth reading directly off the device. Uh, Glance, that's its website. It's, uh, it's really cool and it's very handy. Not at Defcon when you have all your radios off though, so that kind of sucks. Um, and then there's the Night Scout project. And I figured since I cited a formal, uh, medical paper, I would cite this one formally right here. Um, that is the, uh, uh, that graph at the first one that showed 65%, uh, of, uh, of good results and, uh, or I'm sorry, of time within range. And finally, I want to thank my doctor. Um, there are doctors that bounce their patients when they find that they're doing this. Uh, this one is amazing. Uh, he's supportive of it. He's had me show his students, uh, his medical students how it works and all about it. Uh, and I, man, he's getting up there. I fear the phone call that he's retiring, um, like weekly. Um, but yeah, he's amazing. Uh, he is, uh, uh, he's the chief of, uh, of endocrinology at a hospital and he is wonderful. So, uh, talked a little about who I am, uh, and intro to the disease so we're all on the same page. Uh, hardware and software and we talked about safety, uh, talked about iterative improvements, you know, over the course of the year, uh, uh, few years and people are welcome to come up and look at these, uh, at the end. Uh, talked about results, both personally and industrial, uh, and we talked about exponential growth. And so finally, I'd like to take any questions if I have time. Yes? So the question was, what is the difference between the insulin, uh, that I mentioned at Walmart and, uh, the one that he was using? And the, the difference really is, uh, how precise it works on your body chemistry. Uh, the Walmart insulin does not give you the kind of control that you can achieve with, uh, with other products. Uh, it also, uh, it takes time for your body to adapt to a different formulation of insulin. Uh, and so that is, that all of those things probably contributed to his death. Yes, sir? Um, would you say just a few more words about how much of the processing is happening locally and how much is happening on your server? So for the purposes of open APS, none of it happens on the internet or on the server. Uh, the server serves as kind of a dumping ground for data, uh, where, uh, where it houses all that stuff. Um, so everything that, that this needs to know, as long as you tell it what time it is when it starts up, is actually right here. Sorry, actually right here. So theoretically, if you had good dense data storage, you wouldn't need your server anymore. I don't see why that is not true. Yeah. Yeah. Yes? Um, one question, if you could have one other sensor or one other kind of input, um, that you believe would help you control the situation even better, what would that be and why? No one's ever asked me that. Uh, I would have something that was telling me the speed at which my metabolism was operating, uh, because right now, uh, over several days of testing, uh, with, with certain, um, pre, uh, measured amounts of carbohydrates, I know, uh, you know, from, from some evidence how my metabolism works, but that's pretty general and every food is different. Um, so yeah, I would have something that, that did that and kind of informed this so that it could then, it could then say, oh, he's digesting things really fast, just dump more insulin in. Yeah. Uh, right here? Oh wait, um, sorry, over there first. One, one. Um, have you ever had issues, uh, traveling or going through secure locations, having them believe, hey, this is a medical device, given that it's a Raspberry Pi and, and it's got like a, a battery tape to it with wires coming out of it. Yeah. Um, so, um, I'm going to, the short answer is no. And the long answer is Dana, uh, who I mentioned earlier makes it her mission. She does a lot of traveling and basically every time she gets on a plane, she like posts a picture of it after airport security and is like, no one even bat an eye. And, uh, even internationally that's been the case. Um, so I imagine if I had to go to secure locations, which I suppose probably means no random electronics, right? Uh, this probably wouldn't be allowed. Um, but, uh, uh, but yeah, in just in terms of like building security, uh, no, no one's ever, uh, oh, well occasionally someone will ask about it and I say, oh, it's an artificial pancreas and they go, all right. And just kind of hand it back to me. So thank you. Yep. Thank you. And then you, sir. Last question. All right. Um, I guess this might be related to the metabolic rate, but, um, how important is the amount of carbs that you put in whenever you eat them? For example, after exercise, you'll have a different glycemic response. Sure. So what I, what I didn't mention, and I'm actually doing this now, uh, you can, uh, you give this thing, um, a target to hit a normal target to hit, but you can override that temporarily. So what this is saying is until about five, uh, no, uh, all my clocks are off. Okay. At least until about five local time, this is going to set a temporary target of 120. And so what that does is it say, okay, I'm going to go easy on the insulin. So if I know I'm going to exercise, I'm going to want it to go easier on me. Uh, so I set one of these temporary targets, uh, and then it abides by that. So I think I had, yeah, nope. Okay. I'm sorry. Um, we can talk later. Uh, but yeah, thanks everybody.