RPI Windows 10 IoT Sample Project

 General audience classification icon  General audience classification icon  General audience classification icon

Create Simple Hello World Application for Raspberry Pi Board

To create a simple Hello Word application under Windows 10 IoT Core, Visual Studio 2022 or newer version is needed. Visual Studio must be installed with the Universal Windows Platform development extension (figure 1).

 Visual Studio UWP development view
Figure 1: Visual Studio UWP development view

Step 1
Create a new UWP project by choosing the Windows Universal/Blank App Project (figure 2).

 Visual Studio Create New project view
Figure 2: Visual Studio Create New project view

Step 2
Configure your new project (according to Raspberry Pi Windows 10 IoT Core build version) is presented in figure 3.

 Configure new project
Figure 3: Configure new project

Step 3
Choose the Target version of your device platform which Windows IoT Core will support, as in figure 4.

 Target platform selection tab
Figure 4: Target platform selection tab

Step 4
Create App1 solution (figure 5).

 VS 2022 project environment view
Figure 5: VS 2022 project environment view

Step 5
Design the application screen by modifying the MainPage.xaml file. To add different screen features, use the Toolbox/All XAML controls (figure 6).

 Add TextBlock control in the MainPage.xaml
Figure 6: Add TextBlock control in the MainPage.xaml

Step 6
Modify the MainPage.cs file content if you need control events programming (figure 7).

 C# module design MainPage.xaml.cs
Figure 7: C# module design MainPage.xaml.cs

Step 7
Compile and run Hello solution. Choosing the Solution Platform for the x86 user will be able to debug and run the Hello application on the computer's desktop emulator. This step is useful for program touchscreen design but cannot test the sensors and controls programming due to software emulator restrictions (figure 8).

 Solution x86 platform build
Figure 8: Solution x86 platform build

Software emulators aren't capable of simulating their behaviour. Instead, the Solution Platform must be changed to the ARM platform in the VC Solution Configuration property to use sensors and controls. The application package must be transferred to the real IoT device to debug. Correct configuration is present in the figure 9.

 Select a hardware platform for the solution
Figure 9: Select a hardware platform for the solution

Step 8
The user must configure the debug application settings to deploy and debug the application package on the real IoT device. In the Debug property page, the user must enter the proper Remote IoT device IP number (figure 10).

 Set the Remote machine IP number
Figure 10: Set the Remote machine IP number

Step 9
Start debugging the application, and after deploying the application package to the board SD card, it will be displayed on the monitor: Hello application is present in figure 11 and debugging view in figure 12.

 Hello Application on the Raspberry Pi display
Figure 11: Hello Application on the Raspberry Pi display
 Hello Application debugging view
Figure 12: Hello Application debugging view
en/iot-open/getting_familiar_with_your_hardware_rtu_itmo_sut/raspberrypi_rpi/building_your_first_project_winiot.txt · Last modified: 2023/11/23 13:47 by pczekalski
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0