 Hello everyone, very good morning, my name is Rakesh Karthik, Ketanidhi and I work at a company called Robert Bosch. So today in today's session I will be explaining about introduction, a brief introduction of IOT and I will give a small demo using IOT and a couple of sensors and we will see how to send signals to the sensor from PowerShell and we will see a couple of, if time permits we will see a couple of options of connecting the sensors, one using the breadboard and one using a readymade kit called a glue pie which we can buy in the market. So let's start with the presentation, so what is IOT? Does anyone need an introduction to IOT? Everyone here knows about what IOT is, can I proceed? With the next slide or anyone wants me to explain this, feel free, okay cool. Yeah so moving on to the next slide, this is the raspberry pie which I will be using in my demo today, so these are various components here, so basically if you are new to IOT and the new to raspberry pie you can think of it as a mini computer which has Wi-Fi connection in it, the raspberry pie 3 and you can connect to various sensors here using the GP IOT ports and you have USB cables from which you can connect your mouse and keyboard and there is a SD card slot where you can put in your SD card and boot up the OS and various other things and these are the sensors that we could use and these are actually manufactured by company, I mean the ones which are showed here are from globe pie sensors, so we have sensors which can do the motion detection, light sensors, sound detection and you know there are various other sensors like the humidity, temperature, you know lot of these cases and so using these sensors we can easily connect to the raspberry pie using Groove's own kit, so this is the board where we can actually connect these sensors to and this board will be mounted on top of the raspberry pie, so if you see there are two boards here, raspberry pie is at the below and it is actually connected to the Groove pie module and this can be connected to the sensors using some wires, if you do not use the Groove pie kit, the connections would look a bit messy, you know something like this, so we will use motherboard or some other circuit connection and we will see the wires connecting directly to the board, so in my demo today, so I will just explain how I actually deployed my application, I got the application into the raspberry pie and then we will see some partial commands to actually control it, so firstly these are the steps to create applications you know which you can deploy on to the raspberry pie, first thing is you need to have, so all the steps that I am referring to here are to use the applications for the Microsoft you know, so we are using all Microsoft technologies here, so for starting with the visual studio you need to have visual studio 2015 and above and you need while installing it make sure to select the UWP universal windows apps and the IOT SDK, so those are the requirements and once you download it, you can actually download some samples, for my demo I downloaded a sample from this link and then because I am using the Groove pie, I am actually adding the NuGet package, so I just install the command install package Groove pie, if I have to use the Groove pie, if I don't use it then I don't need that step and then I would actually need to go to the properties of my project and set the device, target device as the remote device because my application I do not want to run it on my local computer, I want to run it on the raspberry pie, so I am setting the target device as the remote device and I would select the remote device as my raspberry pie, so basically we need to provide the IP address of the raspberry pie and select, so this is the basic setup of creating an application and running it on the raspberry pie itself, any doubts, so then we will talk about PowerShell on IOT, before going there I will quickly show a demo, so as I said I have my raspberry pie here and it is connected to an LED on my breadboard and my raspberry pie has a display here where I could see in this monitor, so actually Microsoft has provided a dashboard website wherein we can actually see what is happening, I mean we can control the raspberry pie applications from the site itself, I am going to open that now, so this can guide me to the site, so when we search about the Windows IOT code right, so this is the site that is provided by Microsoft, you can see developer.microsoft.com and so when we are creating IOT applications this is the first step to do, you know first we go to this site and then download something called a dashboard, right when I download a dashboard a setup file will be downloaded, let me quickly do that, I just run it and if I am installing the operating system for the first time then what I need to do is I would have you know I need a small SD card and I would insert that into the bigger SD card slot and put it in my computer and from there in the same site which we have seen now, so right now it is actually showing my raspberry pie because it is already there, okay if I have to install the OS for the first time right in that site we would see these options, so I can select the raspberry pie model here and we can also use some other you know boards alternative for raspberry pie and which IOT I mean what is the OS I want to build and then the drive and the name and password, so all these things I can setup I can give the Wi-Fi if it is available and then I download and install, after I do this then the installation actually starts which means the IOT core OS will be installed onto that SD card, then we take that OS and put it in the raspberry pie and thus we can actually boot the raspberry pie with the OS, so I have already done those things, so in my current example here once we do that and connect the raspberry pie to the internet right, how do I do that is once you install the OS you will be able to boot, you will be able to boot the whole thing and then you will see the display you know you could have some small display like this and here in the settings you can actually see the Wi-Fi connections right, which one, no actually that came with the groove kit, so it is just a simple and serious thing, what these steps, how do you install the OS and once you install the OS, how do you see, if you don't have a display you can still use a program called IOT desktop, Windows IOT desktop, remote desktop, Windows IOT remote desktop that actually connects to the same like an RTP client, it actually connects to the raspberry pie, there is no functionality on the, except that you can choose language and other things, you can connect to the Wi-Fi connectivity connection, desktop connection. In fact even if I do not have the display right, nothing is going to impact me because there is not much functionality in here like such as posting saying we can actually control a lot of things from the dashboard that Microsoft provides. Yeah, at least, yeah we would see it's booted but we can also see if it's booted then it will show in my devices here, so I could actually see from here, so right now because it's booted and connected to the Wi-Fi and all, it is actually visible here, so I just can right click on it and open in the device portal. So then it opens this portal here which has a lot of functionalities, you know, so here I can actually go to my apps and it is showing all the applications that are already installed in my raspberry pie. So how did I actually deploy the applications? You can relate to the previous slide that I was talking about, the visual studio and we create an application, actually there are a lot of samples that are available in internet, and the samples which I am using, those were from GroPie site that I have a link for and once you have the samples downloaded visual studio then you can actually deploy it onto the raspberry pie. This is actually a dashboard given by Microsoft, it just kind of interacts with your raspberry pie. So here I have a lot of applications here, so right now we are going to execute the PowerPie application. So my app is already there, so let me go to PowerShell, it has some DLLs and I am going to actually control the DLL, I mean pass signals to the DLL from PowerShell. So this is my PowerShell screen, so we will see how I can actually connect it to the device in the later on slides. So right now you can assume that I am already connected to the device, this is the device IP and I am at this folder script. Let me actually take the path from my text file which I already have here, let me just copy and paste it. First I just want to make sure I am still, the connection is not active that is the problem, let me quickly connect to the device. So what I am doing here is actually creating a remote PowerShell session to the raspberry pie. So now it is connected, I see the host name, so it is printing something. So now let me just reduce the font size a bit so that the commands can be seen a bit better. So what I am doing now is I am actually adding the PowerPie library.dll, I am basically loading that into the PowerShell session. So now what I am going to do is I am going to run a couple of further commands which will enable the connection to the devices. We are basically creating, let's say the exception calling, okay, okay, okay. Maybe I have executed the command already so let me skip this part. $IoHelper, it is sensitive, don't think it is, it is sensitive. Let me just close the PowerShell and open a new session. Yeah, it is my local session actually. So what I am doing is I am passing my credentials and creating an object first. So these are the steps that we do for when we are doing PowerShell remote. Now I would say enter to this session, let me navigate to the file. I am getting some new issue now for some reason. So let me skip this part and let's go ahead with the rest of the presentation. What would actually happen is after running these two commands, then I would run another command which will basically make the LED glow or the command would look something like this. So the IoHelper, I would just create an object and then when I run this command, IoHelper.ping equal to, I would set the value to high or low. To control the sensors, we can basically send signals to the sensors and control them basically. So if I give low, then it would make it glow. If it is high, it would be low and if I make it high, then it would glow and if I make it low, it will switch off. And we can also run a loop and make it blinking like on and off and on and off. We have not created any profile. Yeah, we could, I think so. And yeah, it is using PowerShell code. Let me go back to my presentation quickly and we will go some basic commands that are useful for the IoT stuff. Right now we have tried to see how to control the target devices and we will also see some of the interesting commands that are there. So firstly, whenever we are trying to, now we will see how to connect to the Raspberry Pi from PowerShell. First thing is you need to launch the PowerShell as administrator on your local machine and then start the Windows remote management and add the Raspberry Pi as a trusted host. After that you run the command enter PS session, give the computer the name of the Raspberry Pi and the credential in the credential object. So these are basically simple steps to do PowerShell remote thing on to any machine. Yeah, those, that is true. I mean for this command we might not be an administrator but to execute a few commands we actually need admin privileges otherwise we cannot execute a few commands. So it is preferable to actually launch it as an admin. And then we can do things like changing passwords. So right now I have set a long password, I want to change it. I could run this command net user administrator, mean net user and this is the username and the new password. That would actually change the password and to test it we can exit the session and log in with the new credentials enter PS session with the new credentials. That is some simple stuff and setting the computer name. There is a command called set computer name. This would actually set the computer name itself. So when we use the set computer name and the new computer name that would actually change the name of the computer. And we can set restart commands using the regular shutdown command shutdown slash r slash t and we can add new host. Add the new host, okay. So when we change the computer name then again we have to add it to the trusted hosts to make it work unless we are logging in using the IP address. And we can do things like checking the resolution and changing the resolution. We can use the command set display resolution and we can get the network adapter info using the get adapter info. No, no. These are actually not PowerShell commands but these are PowerShell IoT code commands. Because this only work in the IoT code, Windows 10 IoT code. And there is another interesting command called IoT startup. We will see in a bit. And it has a lot of interesting things that we can do. Like we can control the applications that we have installed. We can actually launch the applications, delete them. We can install the applications and we can do a lot of other things using this command. And we can run the IoT startup help to see various commands that we can execute and what all we can achieve from there. And there is another interesting command which I found is the screen capture. When I run the screen capture and give a path, what it will do is it will take a screenshot of the Raspberry Pi at that point of time and it will store the image in the new path that we gave. Now let us quickly go to the PowerShell and execute a few of these commands and see how they work. So we have seen the path wherein we logged into the PowerShell Remoting. First we create a credential object and then use enter ps session command pass the computer name and the credential object and then enter the PowerShell Remoting session. And let us check this command IoT startup. Now it shows a lot of examples and the commands that we can execute. Let us try the first one IoT startup list. So when I do that it is actually listing all the applications that are already there on the Raspberry Pi. If you notice these are the same applications that we saw in the dashboard. And you see something called headed and headless. The meaning is headed means the applications that have a UI which means you can actually see the UI in the display. When we run the applications you can see something happening on the display. And headless means those are the background applications which you can actually access from PowerShell or some other applications but they don't have the UI. So you can do things like run my application or stop my application. Let us try this command of running an application and see if it is actually running or not on the Raspberry Pi. So I have the list of applications now. Let us try to run the Hello World app. Let's try the PowerPi. You could also play with me. There is some issue with the applications. Let me let's try to conclude this quickly. Let me go back to my dashboard here. You can actually execute the applications from here itself. For example, if I want to execute my Hello World application, I just click on it and now it is executing and my display has changed here. You can see the display. It has a couple of buttons, basically Hello World. I can actually control and click my buttons. So the application is running. I can also set that as a default application. If I do this, then whenever my Raspberry Pi boots, it would launch this as a first thing. We only can have one default app. I can actually stop this thing. You could actually do all these operations from PowerShell itself but for some reason now they are not working fine. I have not faced these issues when I was trying at home but I don't know what changed. If we have time, I would quickly want to try out some other demo. We have five minutes. Let me try a demo wherein we connect a different set of sensors. Yes, it should be possible. From the visual studio, we can push the application to the Raspberry Pi itself. From there itself, we can execute the thing and we can see all the logs. Live debugging should be possible with the latest version. I have not tried that but we are actually out of power. There is an application called Button Buzzer application, one of my samples. I just executed the application and I have connected two sensors here, Button and the buzzer which actually makes the sound. This is something that we can relate to the real world scenarios wherein let's say you want to set some security alarm kind of thing and here we are triggering the alarm to a button but in the real-time scenario you can put some other sensor for example like someone opening some important door or someone opening your place where you store your money or valuable stuff so you can actually use this kind of applications there and we can actually install them on the Raspberry Pi and we can control them from PowerShell remotely and the possibilities are actually limitless and you can do a lot of stuff using IoT. I think the existing samples are really useful to start with and we get this simple to connect sensors and if you are really interested in trying something interesting I think you can go with the Raspberry Kit that comes, Microsoft also is providing Raspberry Kit with the sensors together. This is one of them actually, the seed sensor kit which we got at one of the Microsoft events as a prize which means that Microsoft also has the kits and you can try out stuff and do interesting things. With that I would conclude my presentation. If you have any other questions feel free to ask otherwise they have to be physically connected to the Raspberry Pi. There are many of the scenarios wherein you can actually place the sensors in a remote location for example agricultural, there are things like there are sensors sensing the soil quality so you hold the sensors there and you keep one gateway there which collects the data from all the sensors and that will in turn send the consolidated data to your own application which you can monitor from the laptop. It should be possible but again it has its own limitations on the hardware level. If you want to really go on a bigger scale you need to have bigger hardware. Raspberry Pi is more useful for smaller projects. Any other questions? I think when we talk about the software part it should be generic. The software we have created an application and we pushed it to Raspberry Pi and did some configuration changes which are relevant to the Raspberry Pi but if your main code I think the software should not change as the software itself. The configuration should change. If there are no other questions we would close now and I think we would have some lunch outside. So we feel free to have and we will call it again. Thanks everyone.