[Window 10 IoT, window10iot

Source: Internet
Author: User

[Window 10 IoT, window10iot

In the previous blog titled Windows 10 IoT system installation, we have run Windows 10 IoT on Raspberry Pi 2. This article will introduce program development on this platform.

In the initial information, I thought that Windows 10 IoT version does not support interface development. I did not think that after the actual test, the screen function supported was not bad (the screen function supported, can be opened or closed through the command ). The support of screen functions will increase the number of application scenarios for Windows 10 IoT systems. In addition, we thought that the development of Windows 10 IoT must be based on the Windows 10 platform. The actual test showed that in Windows 8.1, we can still use Visual Studio 2015 RC for Program Development and online debugging.

I. Development Platform preparation

(1) install Visual Studio 2015 RC or install Windows 10 development tools only

Download link: https://dev.windows.com/en-US/downloads/install-dev-tools-visual-studio-2015

If Visual Studio 2015 has been installed, you can only install the Universal Windows App Development Tools.

(2) install the windowsdeskprogramforiot. msi tool in the Raspberry Pi Windows 10 image download package. This step does not seem necessary. The actual test shows that the program cannot be opened normally in Windows 8 or 10.

(3) Raspberry Pi 2 (running Windows 10 IoT) and LED lamp components

(4) ensure that the system is in the "Headed" mode.

 

You can run the setbootoption.exe headless or setbootoption.exe headed command to modify it. After the modification, restart the system.

The Headed support interface is displayed, and headless is not supported (Gateway mode ).

(5) program download example (LED light flashing example)

Https://github.com/ms-iot/samples/tree/develop/Blinky

(Copyright of ye fan studio)

Ii. program debugging

(1) Raspberry Pi 2 should be connected to your debugging PC through a network cable (ensure it is in a network segment)

(2) The GPIO controlled by the program is 5, so the LED light is connected to the GPIO 5 (29Pin) pin.

 

(3) Open the downloaded sample program and configure it as follows:

 

Set the device to "remote computer". You can enter the machine name or IP address.

(4) Click the run button for debugging.

 

Supports breakpoint and single-step debugging.

(5) Actual running effect

If everything is normal, you can find that the LED lights flash off, and the circle on the display screen will flash synchronously (white or red ).

 

Iii. Notes

(1) You need to register as a developer (with the same development permissions as the actual windows Phone device ).

 

Otherwise, the above prompt will appear, and the deployment error will also appear: "error: DEP0100: deployment failure due to developer authorization issues ."

(2) During the first deployment, some necessary libraries will be deployed to the device, as shown in:

 

Iv. References

(1) Configure your PC

Http://ms-iot.github.io/content/win10/SetupPC.htm

(2) Hardware preparation and program debugging

Http://ms-iot.github.io/content/win10/samples/Blinky.htm

V. Summary

(1) In addition to GPIO, Microsoft also provides many examples such as I2C and SPI for us to study, as shown in:

 

The "iotcoredefaapp app" is an application that comes with the Raspberry Pi system by default. In addition, this is only universal application development, and it is also worth studying.

(2) Use Visual Stdio tools for development and support breakpoint and single-step debugging. The user development experience is excellent.

(3) This is just the beginning. I believe that Windows 10 has a wider development space when there are more IoT-related devices.

(4) there will be time to write articles related to Windows 10 IoT development.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.