From the course: Introduction to IoT with .NET Core

Hello World in IoT, Blinky: Headless mode tutorial

From the course: Introduction to IoT with .NET Core

Hello World in IoT, Blinky: Headless mode tutorial

- Welcome back to the .NET with IoT series. In this video, we're going to learn how to run the Blinky sample in headless mode. So here I have Visual Studio Code open. This has the Blinky sample that we saw in the ripoff, in the previous video. So I'm going to get started and I have all the files you can see present over here on my laptop. I am going to build a published version of this. So I'm going to use the .NET CLI, and .NET publish dash r. I'm going to use the Linux arm as the target type. And this is now building our code. So the code is ready, the app is published. Now, let's go into the Raspberry Pi. So as we saw in the setup video we've already set up an SSH connection to a Raspberry Pi. So I'm going to connect to it right now. So I'm going to SSH, the PI, use the IP address and log into it. And now that we're in the Raspberry Pi, I'm going to create a folder for our samples. So, I'm going to call this blink. Now that we have the code compiled and ready to run on the Raspberry Pi, let's copy it over. So, let's go into where the code was published and then this was off target type Linux. And I'm just going to check that our Publish folder is ready and here to copy over. So, now that we verified the Published folder exists, let's copy it over the Raspberry Pi. So I'm going to ACP this file. ACP is already built into the Windows terminal. So I'm going to give it the whole Publish folder and then we're going to put in address to the Raspberry Pi, and then point to the folder that we just created called Blink. Once I login, you can see it's copying over all the DLLs and the necessary files that we just built from the Publish folder into the Raspberry Pi. And this is the completely packaged version of all the things the app would need to run. So we don't have to worry about doing anything else on the Raspberry Pi. So once the copy is complete let's move over to a Raspberry Pi. I'm going to go into the Blink folder and make sure our files have been copied. Before we can run this on the Raspberry Pi, we have to give the file the correct permissions. So let's do that right now. And now we can run this on a Raspberry Pi. Let me switch over to the camera. Here you can now see that the led light is blinking. So in this video, we learned how to run the led sample in headless mode in the Raspberry Pi. Join us in the next video when we will learn how to run the Blinky sample in boot to desktop mode.

Contents