New post for Windows 10 and Raspberry Pi 2 series
- Hardware and software (1 on N)
- Boot from SD card in the device (2 of N)
- Hello World mode! (3 of N)
- Visual Studio deployment process and Web Management app (4 on N)
- Hello Blinky !!! (5 on N)
- Some admin tasks, like change password and change name (6 on N)
- List of connected devices in the Raspberry Pi 2 (7 on N)
- Deploy an app using the deploy package (8 on N)
Today is time for some IoT and Raspberry Pi 2 code with Visual Studio 2015 RC. Let’s start creating a project, the project type will be Windows Universal Blank App.
If you don’t see this type of projects in Visual Studio, you have to go to “Programs and Features” and change Visual Studio 2015 RC installation options. The option that you must have is “Universal Windows App Development Tools“
Now you got it, go back to Visual Studio and create a new project with the following steps
1. Menu “File / / New Project“
2. Select “Templates / / Visual C# / / Windows / / Universal Windows / / Blank App“
3. For the name we are going to innovate with a “Hello Valentino”
4. The app that we are going to create is very simple: by pressing a button we’ll get a welcome message. For this we will add a button in the XAML and its corresponding driver in CS. The code for both is similar to the following
5. You are a smart coder, so the app will not fail, so let’s forgot about the local run 😉
Once the Universal App works correctly, we can now deploy it to Raspberry Pi with Windows 10. Although there are several options to make this action, today will choose to do this from Visual Studio 2015 RC.
6. First we must check that the Raspberry PI 2 is online in the local network. In the last post I explained that Windows IoT Core Watcher shows the devices when they are in our network
7. My device has the default name “minwinpc”. This name or IP is what you will use VS to deploy the app on the device.
8. In the project properties, in the section “Debug” we’ll change the boot options so that unfold and debug remotely.Use the device name or the device IP in the Remote Machine section
Important: While the project is in DEBUG / X86 mode by default, we’ve to change the platform to make it ARM so that it works correctly on the device.
9. Go back to the beloved F5 and see the app deploying in the Raspberry PI 2.
10 in the device, I plugged a mouse, so I can test the app in a very fast way. Nothing better than a video to show this.
And, important detail, to ask for the date and time, see the regional settings on the device is by default in the USA 😉
As well, in the next post we will see a little that there is behind the publishing process 😉
Regards @ Home