 Hi, everybody, and welcome back to another episode of Visual Studio Toolbox. I'm here with my guest, Suze Hinton from the Cloud Advocate team. Hi, Suze. Welcome to the show. Thank you so much. I'm so excited to be on Visual Studio Toolbox. This is awesome. Great. Well, we're happy to have you, and we're actually going to do a series on Windows IoT development, and this is our first episode. So, let's jump into it. What are we going to talk about today in this episode? Yeah. Today, we're going to start with the basics. So, we'll be talking about what Windows IoT Core is, because that's what we'll be using for this whole series, and just how it differs from regular UWP development, and also just how you can get started with it. Yeah, that's awesome. And I think one of the reasons we wanted to do the series is because as a Visual Studio Developer, you have just a lot of power to do this very easily. The tools are integrated, you can deploy from it, you can debug from it, you can do all these capabilities. So, as a Visual Studio Developer, this is super relevant to you. I think that's how I view it personally. Yeah, totally. And I was really surprised when I first used Windows IoT Core with Visual Studio because this is probably the best debugging and feedback cycle that I've ever had when developing an app just for hardware in general, because it makes it so easy to actually run apps and make changes and continually debug your application. Okay, that's awesome. So, give us a little bit about your background. How did you come to this world of IoT? What did you do? Sure. So, I've been a developer for around 12 to 13 years now, and IoT was always a hobby for me for a long time. And then I just started getting more and more interested in it, and I came to Microsoft to focus on IoT within the Cloud Developer Africa team. So, I get to do a lot of really cool stuff in Azure to do with IoT. Okay, that's awesome. All right, well, let's jump into it. So, what are we gonna show today? Yeah, sure. So, we're gonna talk about what Windows IoT Core actually is, because technically, it's still Windows 10, but it is a little bit different, right? Yeah. So, it's basically the Windows Core. It has a build number, you know, we were talking about this before we started recording. Like, this is Windows running in a small device, and maybe we can show the device in particular that we're gonna demo today when we start there. So, what device are we gonna be running everything against? Yeah. Because you're not like, there's no emulator for Windows IoT. Like, that was one of the things I remember thinking through as I was learning. I was like, I'm used to the emulator thing in the Windows development space. Here, I needed to buy something specific. That's right, yeah. So, the most common device that we usually recommend for people to get started with is a Raspberry Pi. And you can get a Raspberry Pi or a Version 2 or a Raspberry Pi Version 3. So, over here, we actually just have Raspberry Pi Version 3. I have it all plugged into a bunch of stuff that we're gonna go into more detail about soon. So, I do actually have like a little HDMI mini screen, and that's just running the default Windows IoT Core app right now. That's just plugged in, like I said, via HDMI. And we have it connected to the ethernet, so it has internet access. And then we have this rather scary looking breadboard here, but I promise that it's gonna be super fun. And that's got some extra pieces of hardware that you can start controlling from Windows IoT Core. So, I think as much as I think this series of episodes is gonna be focused on development, I really want visual studio developers to walk away feeling comfortable with the hardware we're looking at. Like, this has been a hobby of mine as well, not as many years as you. I am such a newbie to this, but I feel like they gave me a perspective. Like, when I started learning, and I was like, okay, first emulator, okay, no emulator, you gotta get a board. So, I bought a board. And I actually bought a bunch of boards over time. And one of them isn't compatible with Windows IoT Core yet, I found out. So like always, when you're buying hardware, you've gotta be very specific in this space. You can't just like, order something randomly expected to run Windows IoT. There's documentation, there's a list of like articles that say, these are the boards that are supported. And we have a board here that's obviously supported. We've tested it, this is the one we're gonna use. And then it's connected to a bunch of other hardware. And the point is that, like what I've learned is that, think of the board as your PC. That's what's running end to end everything. It has the stack of networking, has USB support, has HDMI out. So it's a little mini computer in your hands. It's powered by a little bit of wire, right? Just a regular micro USB adapter. And then it has a different port on it. So it's really easy to get started. But then the breadboard is kind of scary. So maybe you can talk about the breadboard a little bit. Because I remember getting that as a gift. I got like a package, I had a Raspberry Pi. My team gave this to us like a while back. That's what started my obsession. And I took out the breadboard and I was staring at this thing for a long time. And it has pins and stuff. It's kind of intimidating if you've never done hardware before. So tell us about it. Yeah, it is really intimidating. But once you actually get used to using them, they're really, really cool. So this breadboard here is a really, really long one. So it's got a generous amount of room to play with. But the idea is that you do have these kind of holes or these pins that you can put things into. And it means that if you don't know how to solder, you can just play around a lot without actually creating any permanent damage. Or without ruining your devices. So a breadboard is really just a way of testing out ideas. And it does it in a way that's very, very convenient. So every single little sort of like hole that you see is connected to copper underneath. And so it is connected in a very specific way, which makes it really easy to get started with it. So if you'll see along the top and the bottom of this breadboard, not all breadboards have this, but the one that we're using today does, we have these kind of this red and this blueish lines that are running along. And this is just like a really nice, easy power rail, which is what we call it. And if you have a look at the top row of these holes, that actually connects in just a straight line all the way along underneath. So you can think of anything that you put along this top row are all connected together. So you can actually create like a source of power for all of your devices, rather than having to just use the one source of power that's on your Raspberry Pi, which is really cool. And then the bottom row, which is the blue with that little minus sign or the little negative symbol, that's actually your ground. So again, you usually have devices always plugged into ground and power and you want to be able to have enough room to plug them all into the same source. So that's a really nice part of a breadboard. The rest are not actually sort of running horizontally like the power rails are. They actually run vertically. So if I start at the first row and go downwards, all of these holes are connected to the one sort of copper line underneath. And so if you wanted to have different things plugged in to each other, you can actually just use that same line without having to literally join them together and solder them, which is really cool. And so you do get used to it. It is a little tricky to kind of get the hang of, but if you look at pictures of breadboards online and have a look at what's actually underneath those holes, it really starts to make sense. Yeah, and I think what helped me kind of think about this breadboard is like this. This is like you said, it's a platform from experimentation and there's a bunch of stuff you can buy as a developer. Like in this episode, I'm not assuming you know any of this as an audience member, right? You're watching this, you're like, okay, I kind of get what that is now. This lets me add more devices or more widgets or lights or something that then can be controlled by my Windows IAT cord, which is the Raspberry Pi itself. And that's why the breadboard is hooked into the Raspberry Pi with a big cable. And then Raspberry Pi has all these options where you plug stuff in and then you can magically would code, control that stuff that's plugged in or get data from it, et cetera, right? Totally. But you don't have to know any of that in the beginning. In fact, what I found really cool is that because it has USB on the Raspberry Pi itself, you can do things, we'll show this in one of the episodes like the life cam, right? Yeah. I literally found my old cam that was like dusty. I pulled it out, I plugged it in and I had video and I could capture video and I could write code that used video and do something with it. That's all very possible. Now you have to know what is or isn't compatible device-wise with the Windows IAT core platform. The driver's still needed there. Like there's no magic in that sense. But there's some magic with the breadboard, right? Because you can actually write stuff against it. So this is a more advanced scenario but I just want to open up people's minds. Like you can get a piece of hardware, you can plug into the Raspberry Pi for the board and then you can write some generic code which even if there is no driver per se in Windows, if Windows doesn't know what this thing is, you can still send commands to it and get data back from it. Can you talk about a little bit of that? Yeah, absolutely. So in electronics, we tend to try and have some kind of standards just so that it's easy to kind of develop against devices. So we have a few communication protocols that are really common and we do have the implementations of that in Windows IAT core and in UWP which is really cool. So one of those, for example, is I squared C which is into integrated circuit bus. And that allows this common API where a lot of different devices speak that particular protocol and because we support that in Windows IAT core, you can literally pull up a data sheet which might seem really scary at first but once you get used to it, it's pretty cool. And you can very easily grok once you understand the protocol, how to write those generic drivers. And so that's super empowering when you come across a device you want to use but it's not necessarily something that is certified to work. But if you know what protocol it speaks and you know that that protocol is supported in Windows IAT core, you can pretty much write whatever drivers you want. Yeah, and it's really empowering and it doesn't feel as intimidating when you want to learn a few of the hops over. Again, we're not going to cover that necessarily in super detail but I found it accessible. I searched for something, I bought a piece of hardware at home, I plugged it in and I realized, oh man, there's no driver inherently and not like the live cam, not like some of the other things. But I was able to find a sample because somebody else of course did the work for me already and some C-sharp code and it just worked. It was kind of magical. This device just started sending me data back to my Windows IAT core and then I can do whatever I want with it. Another thing to remind people is that this is all C-sharp, right? Like this is UWP, it's C-sharp, it's Windows Development, it's Visual Studio. We're not going to cover anything where if like, oh, you need another tool. Like all you need is a Windows machine as your developer environment, Visual Studio, community or above. If you know C-sharp, you're good to go. If you know UWP, it's even better. I'll give one of my experiences that I found. I looked at the Windows UWP sample library up on GitHub and I found out that, oh, a bunch of these samples just run really well. Like the sample that says, show video and save it to disk. Like that sort of thing actually just works because it's just UWP, right? Yeah, I was really pleasantly surprised by that because I wasn't really sure what to expect from Windows IAT core because I know it's like a more sort of optimized version to run on like a slightly less processor. Really tiny, really, really, really underpowered devices. Yeah, it's so small. And so I think I just immediately assume there'd be limitations. But even just plugging in a webcam via USB, like you said, if you're scared of breadboards at first, I just use the same like media capture, you know, like classes and things like that that I would normally use on my full laptop. It was really, really cool. Yeah, and there's also a bunch of like add-ons. Again, this is the hacker space. So as you're kind of experimenting, there's more than one way to get things done and I bought a board that kind of plugs in right into the pie. It's actually designed for the pie and then it has a bunch of sensors attached to it and then it comes with an SDK and that just magically works because that's against just me running C-Ship code against this SDK library and it just kind of works. So there's like multiple ways as you kind of look around the internet and you look at samples, you might be like, oh, they're not using your breadboard. What is that? That also works. Well, yeah, there's more than one way to do it. Some people plug things directly into the pie, like those connectors that the... The GPIO? Yeah, the GPIO port, like that can be connected directly to it as well. So I've done that too, like I had a screen that connected directly to it and that worked as well. I also found stacking works, like there's some boards you can stack on top of the pie. Oh yeah, they like code hats or something. Yeah, and then you can pass GPIO through. So there's like, there's so many ways to do it. So don't get intimidated audience, you know, as you're watching this, I found it just fun and I just wanted to point it out. And they also want to mention that this is ARM, right? That's another different thing, right? So talk a little bit about that, like what does it mean for you as a developer, a UWP developer? You can just kind of work, right? Because Visual Studio can build to ARM. Yeah, exactly. So ARM is a pretty common like build target for Visual Studio. You just have to keep in mind that if you've been developing just for desktop for a while, there might be certain things that aren't available when you're building for that target, but what I really like about Visual Studio is it'll immediately tell you. It won't let you build. Yeah, exactly. I think the best thing about building with Windows IoT Core is the fact that you don't have to learn a new language and new program and things like that, because I feel that the electronics part, it tends to be intimidating enough. And so you can just focus on that being the new thing you need to learn. And then Visual Studio kind of keeps you safe in those regards where if you try and use something, it'll tell you that you can't. So usually my advice is to just play and just try and write your app like you normally would and just kind of see what's supported and what isn't supported. Okay, that's awesome. And what I found works today on Core as obviously the UWP platform. Like it couldn't, if somebody gives you something that was built for x86, it just won't run. Like you'll try to run it. You can like I copied some code over, I tried to run executable and it said it doesn't support this platform. That's the error Windows will give you when you run something. But UWP built for ARM works because that's the scenario we're gonna be showing. There's also some newer scenarios coming out. So for example, I found that like .NET Core, 2.1 RC, like preview four for sure, definitely works. So you can build that. I mean, it's like we're going to preview space but we have a lot of people in the audience that love .NET Core, right? So you can, you can now start running .NET Core on this because .NET Core, not the developer SDK but the runtime SDK can target ARM now. So that's the new thing that they've done. It's really awesome. It really just made it feel like it was just regular Windows development. Yeah, another thing I wanna point out to folks, again, things that I just very recently learned. So they're fresh in my mind. You can run more than an interface app. Like, yes, you can write a UWP app that's a foreground app that has buttons on it or something you interact with. But you can run things as a background app as well. So the platform is pretty flexible. There's plenty of scenarios where you just wanna run something on the device that's running in the background. And then you might wanna have that be something that's on telemetry or using some hardware or whatever. Other times you might have a screen attached like we have. And there's screens that support touch as well. Like this one could be configured for that. We don't have it. There's some that are even easier that you can just bolt right on and touch will just work out of the box. So you could have this thing be a display. I've seen people make like a little tablet out of it. I mean, it's really hard to stuff. Buy, if you want a tablet, buy a tablet. Don't make this your primary tablet. This is like way more fun than buying a tablet. This is way more fun. So that's kinda cool. And yeah, I think, again, it's very accessible, lots of ways to do it. And we'll work through every detail. Like this episode wasn't meant to be the very deep dive in the Visual Studio part yet, but we felt that if we didn't explain all this, we'd jump right in and you'd be like hardware. Like this is weird, right? It's not as natural. And you're gonna put up a GitHub repo right, which will say exactly every single piece of hardware down to the version number so that people, if they wanna reproduce this 100%, they can. And I found it difficult from past videos. People would show something. And I'd be like, which pie? Like you said pie, but pie two, pie three, pie three, B. And that's really important, you know? Yeah. Yeah, so we have this thing in electronics that we call like a BOM or a Bill of Materials. And so if you are a responsible person, you actually list those things out. So I only used parts that are easily accessible. And some of those parts are actually in some Azure certified kits that we also offer as well. So I tried to make it as easy as possible for everyone to get their hands on this stuff so that they're not hunting down weird obscure eBay websites and things like that. Yeah. Make it easy to use people. All right, so is there anything else we wanted to cover in this introduction episode? No, I think that was it. I'm kind of excited to dig into the hardware nitty gritty side of it next. Okay, awesome. Well, we'll tell the secret to the crowd. We're gonna record all of these today, right? But we're gonna space them out as we release them. It takes time, folks, to get these things finalized and published. And we wanna make sure you get to see all of them. But there'll be a bunch of episodes. This is the first one. It's all closed by saying that we plan to do six. If all goes well today in the studio, please don't kill us if we make five or something. Hopefully all the technology will work. But the six we'll cover and we'll put into the abstract some information about what episodes you can expect in the future. And then we'll ship them every week after we ship the first episode to get it out there. I think the goal, as you mean, you have like we wanna demystify the hardware to software to debugging lifecycle. We wanna make sure that you can start the hardware, you can understand why you have this hardware. You can debug to the hardware. And then we'll start adding sensors and IoT support for the cloud, the Azure IoT. And we'll do a bunch of other cool stuff. We'll even look at like fabrication if all goes well. And how you can make this a little bit more real for your tinkering world. So lots of exciting episodes today. Yeah, I'm excited to break it into parts so that we can just look at detail at everything so that we don't leave any sort of stuff behind. So that people feel empowered to like get started straight away. So. All right, yeah. Sounds good, right? Thank you for being in the first episode. And we'll be back with future episodes. And thank you folks for watching. We hope you check out the whole series. And thank you for watching Visual Studio Toolbox. We'll see you next time. Bye bye.