 Hi, I'm Rich Lander. I'm a member of the .NET team. Today, I'm going to talk to you about how .NET Core can run in small places like IoT and Raspberry Pi. So you can run .NET Core on a Raspberry Pi 2 or 3. We don't yet support Raspberry Pi 0, but we're working on it. Most IoT devices support ARM hardware and often talk to devices like sensors, displays, and other things. .NET Core 2.1 added support for Linux ARM32. .NET Core 2.2 added support for ARM32 for Windows. This time around with .NET Core 3.0, we're adding support for ARM64 for Linux, which you've had a lot of customers ask for. So .NET Core now has APIs that enable you to build IoT applications, specifically programming the hardware pins or GPIO pins that are available on Raspberry Pi and similar devices. So IoT development is a bit different than client programming, or server programming, or Cloud programming, because it involves a combination of software and hardware. So you need some basic electronic skills like creating small circuits, using resistors, understanding what a load or a ground is, and it's actually not that hard. I learned this really quickly in UCAN2. So one of the tools you can use as a breadboard, it's really useful for connecting all the wires together and avoiding making a mess. Because eventually you're going to find that something doesn't work and you have to debug all these cables and a breadboard helps you do that. So many IoT devices use serial protocols, and they have really specific expectations on timing and the data that's going through and we now provide APIs. So that makes that easy. So speaking of APIs, we have two NuGet packages that you can use. One is System.Device.GPIO, and that enables all the fundamental scenarios that you would care about, like turning pins on or off, or using specific hardware support protocols like GPIO, SPI, and I2C. The IoT.Device.Bindings package exposes higher level APIs that target specific devices. And so this is the one that you're probably going to want to use because it's much easier. So for example, there'll be a specific temperature sensor and there'll be a class for that, and all you need to do is call specific APIs to get, say, the temperature or the humidity, as opposed to needing to know the very specific pins to use in a particular combination. System.Ports.Serial is a namespace that we've had for a long time, actually going all the way back to .NET Framework. But until recently, we didn't have support for that on Linux, only on Windows, and we had a bunch of requests for that, so it now works on Linux. All of this is going on at the .NET slash IoT repo. So please take a look there. We have people contributing, device bindings, bug fixes, reporting issues, and we'd love to have more people helping us out. Okay, so let's take a look at what code looks like for an IoT application. So this is actually the minimal application for turning an LED on and off, and you can see right away that I've hard-coded pin 17, that's the one that I'm actually connected to, connected the LED to, and what we're going to do is we're going to turn that light on for 1,000 milliseconds and then off for 200 milliseconds, and then keep on repeating that. And so you can see we create a GPIO controller, that's basically the underlying concept that owns all of these pins, and then we're going to be in a while loop, and we're going to run that forever, and you can see that we're writing a high value and then a low value to that specific pin 17. You probably noticed that we have this while true loop that goes on forever, that's not a common pattern in most, say, server or client programming, but it's completely the way things work in IoT land. Okay, let's take a look at an application that's a little bit more complex. You can see here that we're operating over a much larger set of pins, this is something like 10 or a dozen, and then the important part of the application is actually down here. So you can see that we've created, this is animating an LED bar, and what you can see here is we're passing in both the lit time and the dim time, that's in this case it's 200 milliseconds and 50 milliseconds, and then we have various animations that we've created to make these lights do various things. And so this is just another example of using .NET, this is regular C-sharp code, and you can see that it's really simple to just cycle through a set of LEDs, most of the code here uses this cycle LEDs method that I've created, and it's given a params of a set of LEDs, and then it just turns them on and off according to this whatever is needed. So that just gives you an idea of what a bit larger of a program looks like than the one we were looking at before. Okay, so what can you build? In short, anything. So .NET is a great option for non real-time scenarios. If you have a real-time need then you probably want to choose something else, you probably don't even want to choose even Linux or the Windows operating system to make those things work. It is really easy to make lights blink right to LCDs and query sensors for the information that they expose, including accelerometers and other things. So we're building support for LED matrices right now to enable dashboards and other kinds of displays. We think that there's a bunch of folks that probably want to make those work. We're also building support for CAN bus, which is a serial protocol that's used for automotive scenarios. We have some specific customers that are asking us to build that, and we'd love feedback on what you would like to see supported next, because we've found that there are so many different scenarios in the IoT space. So one of the scenarios that we've started to build is support for LED matrices. So each one of these matrices is a two-dimensional set of LEDs, and here we've data-chained four of these panels together. Sitting behind them is a single Raspberry Pi running .NET Core that's running an application. It starts out with just a set of colors being displayed on the four panels, and then we move to displaying animated text and the time, which is constantly being updated. Really we see a lot of potential here to display any sort of content on these displays. We're just trying to figure out what are the next steps on the journey here. How do you get started? Here we're going to be talking about Raspberry Pi, but you can use other sorts of devices as well. So the best place to start is buying a kit from, say, Adafruit or Sparkfun, and there are other vendors for this hardware as well. Download and install .NET Core on your Pi. You can install the SDK and actually do development itself on the Pi. You can also just install the runtime on the Pi as well. Both scenarios work. And in terms of actually building your application, you can build it on your desktop machine or your laptop, or you can build it on the Pi as well. So if you're going to build it on the application on the desktop, then you deploy the application to the Pi. I use tools like SSH and SCP, Secure Shell and Secure Copy. Other folks use Putty, there's several options. Or you can, like I said, just run and build the application on the Pi. And you can debug remotely from Visual Studio or Visual Studio Code. So I hope you liked that. So let's talk about what's next. So we need to take the two NuGet packages that we've built, system.device.gpao and iot.devicebindings and bring those to quality and make stable releases. We also need to ship .NET Core 3.0, which you probably expect we're going to do. Next, for you, get familiar with these APIs. Try them out, learn about hardware programming and contribute to .NET slash IoT and have fun. There's a lot to learn here and we've certainly enjoyed building this new functionality and we hope you really like it.