Technology is changing faster than most people can keep up with. Take the Internet of Things (IoT) and artificial intelligence (AI) for example. Soon Google Home and Amazon Alexa will know our every move. But is this good or bad?
Here’s a comprehensive video for you to watch and learn. Enjoy!
I’ve actually got a couple of devices plugged into me. Right now I’ve got this band. This is real. It’s monitoring my heart rate. But I’m also a Type I diabetic. And I’ve been diabetic for 20 years. One of the things that every diabetic does when they become diabetic is they try to solve this problem usually with Microsoft Excel; but at some point they try to figure out, well, I’m a diabetic and I’m an engineer, let’s plug some wires together and see what we can do. So when we say the Internet of Things, I think it’s great that you, the normal sugared people, you know, you have your FitBits, and we think that’s adorable, but I have an insulin pump and that insulin pump is plugged in. There’s the insulin pump. And it’s plugged into my arm. It’s 24 hours a day. And that talks to a system. Here is a CGM. That is my actual live blood sugar right now. You see how it’s kicking up there a bit? That’s because of stress.
That’s actually plugged in down here in an implant in my side. Sorry to show you my chubbiness. And this is real. When you hear Internet of Things, you think Fitbit and you think Raspberry Pi, but I think this. And we’ve plugged this into some cloud systems that I want to share with you. While the Internet of Things is fun, things like Raspberry Pi, this is great, this is a Raspberry Pi, this is an Internet of Things enabled one. We’ve actually got C code on this talking to this temperature sensor. So what does that temperature sensor look like? Let me switch over to some code here and show you.
This is some C code inside of Visual Studio. This is the low-level stuff. C code makes your eyes blur a little bit sometimes. What you need to know, people who are wearing suits is you’ve got IoT Hub and you have Azure devices. So the takeaway there is that that’s cloud-enabled. But for the developers that think this is crazy, I want you to notice that we’ve actually got a Visual Studio plugin to do remote debugging of things like Raspberry Pis in Visual Studio. So whether it be high level, updating hundreds of thousands of objects, or whether it’s low level and doing remote GDB debugging to a Raspberry Pi, we can do that. Now let’s talk about my system. Let me bring back to the slides here for a moment. This is overwhelming. This is Azure, and all these icons, all these people doing all these things. Let’s talk about me and the system that I’m building. That’s me in my shirt. I’ve got my bands. The band goes to Microsoft Health. That goes ultimately into storage.
My glucose system actually goes up into an API, and I pull that data in as well because that’s personal to me. I’ve got my heart rate over years. I’ve got my blood sugar for years. What can I do with that? I’m going to show you some visualizations, some graphs and I’m going to plug some things into Office and see if Azure machine learning can answer some really interesting questions about me and my health.
And this is all live and this is all real. So let’s come back over to this machine here. This is a system called Nightscout. This is an open source node application that is running in Azure, and this talks to my CGM, my Continuous Glucose Meter. And I want you to point out a couple of things here. This is the first presentation today. And this is now. That is a real-time system that is showing my blood sugar.
You have to think about the sense of power and enthusiasm I had suddenly have for Excel that I did not have before. I’m a Web developer. That’s a Web application in the pane there. And it works in Excel Online. And one day it will work in Excel on an iPad. It’s like PFT. Once you learn how to use one Lego piece, you can then plug them into other stuff. It’s extremely heartening for me to do this. Again, if my blood sugar isn’t interesting to you, and it shouldn’t be, maybe some hobby of yours or something at work or some inspiration will come into your mind and you’ll think about how you can plug these things in together. That’s what’s so exciting about this. So I’ve got all my blood sugar in real time. I can collect it into the cloud.
What else can I do with it? Let’s switch over to another machine here. I’m going to switch over to a Mac. This is a Mac running VS Code. And this particular Mac has got the code to collect my data from the whoops from the health API. So we’re going to go and make RESTful API calls, standard API calls off to Microsoft Health, which is where the Band-Aid is stored because this is the thing that’s so important.
It’s my data. It’s my heartbeat data. My blood sugar is my data. Once I have that ownership of that data, what can I do with it? I can plug in that data and do different stuff. Let me see if I can jump out of here. This has gone full screen. Full screen can be a little confusing. There we go. I’m going to take that data, and I’m going to pull it out of the Microsoft Health API. And this is a storage explorer. The reason I wanted to show you this on a Mac is because this is the Azure Storage Explorer that we’ve released. That’s cross-platform. We’re looking at the CSV files of my blood sugar data as it’s sitting in the cloud. Excuse me. My heart rate data, pardon me. I’m going to hit download. I’m going to throw that on a desktop. Watch the right side. Now I have power. Now I have control. Now I’ve got a hold of that and I can run analysis on it. And now, in this case, I just brought it down to the desktop.
I can do some test notifications on my blood sugar. I’ve got I can do some analysis here, but maybe I want to do that analysis in a more sophisticated way. When you start thinking about the Internet of Things, you start thinking about huge amounts of data. I said it has my heart rate. Like how much is that? Is it an average over a minute, over five minutes, over hours? This is a huge amount of data. My blood sugar is doing three or 400 datasets every single day. Over the course of a year, this adds up to huge amounts of information. This is where simply putting it into Excel and sorting going looks like a pattern isn’t going to be enough for me. I’m going to need to do some machine learning. I want to find out about why does my blood sugar go up when I’m stressed out.
What does Thanksgiving dinner look like? Maybe I can answer those questions with machine learning. So I’m going to switch back over to this system here. And what I’m going to do, I’m going to jump into here. This is a machine learning kind of algorithm that I’ve put together, experiment, if you will, to pull in data from the heart rate on the right there from Azure Storage and the glucose data and I’m going to come up with a stress index. I’m inventing a number the Hanselman Stress Index. And we’re going to load that data up. And what we’re going to do is clean it up, do a little bit of normalization, do a couple of analysis, run some statistics, and then come up with a dataset that the result is going to be a time-based dataset of my stress.
Okay. So that’s kind of interesting. It’s pretty powerful, though, that but I need to see it over time. So how would I express this over time? And what value is there in it? Well, there is this API in Office 365 and all of Microsoft called the Graph API, the Microsoft Graph, graph.Microsoft.com, and this allows me to pull my information. I keep stressing, it’s my blood sugar, my heart rate, and my calendar and my email. I want a unified API to go and get those things and the graph API, you can see there at graph.Microsoft.com allows me to make those requests.
[Laughter] [Applause] Darn it. It is a really, really great time to be a developer. I can put stuff like this together now. It is an extremely personal time. It’s an extremely empowering time. You know how we keep telling everyone: Teach the kids how to code; everyone needs to learn how to code. That’s a part of it. But we need to teach people how to think about systems and how to plug stuff in. I don’t know the Graph API. But it made sense because it’s using open Web technologies. I don’t know a lot of open source systems.
But I’m learning those libraries. And I’m bringing them in because they’re using open tech.NET is open source. If I have questions, I can look at the docs but I can also read the source. Maybe I want to run a Mac. Maybe I want an iPhone. I can build those systems with the mobile tools in Visual Studio. Maybe I want to run on Ubuntu then I can use Visual Studio code and I can write Angular and use Go and run those things in the Azure cloud. It’s such an exciting, empowering time to be a developer now. I really hope you have as much fun building stuff as we have had to build this stuff for you. And I really look forward to seeing what you all can build. Thank you very much and have a really great day.
Thanks for watching. We hope this video about IoT was helpful. Please share!