Windows 10 IoT Core and Azure IoT Hubs : Hands-on Lab

ConnectTheDots will help you get tiny devices connected to Microsoft Azure, and to implement great IoT solutions taking advantage of Microsoft Azure advanced analytic services such as Azure Stream Analytics and Azure Machine Learning.windows 10 iot core and azure iot hubs hands on lab

This lab is stand-alone, but is used at Microsoft to accompany a presentation about Azure, Windows 10 IoT Core, and our IoT services. If you wish to follow this on your own, you are encouraged to do so. If not, consider attending a Microsoft-led IoT lab in your area.

In this lab you will use a Raspberry Pi 2 device with Windows 10 Iot Core and a FEZ HAT sensor hat. Using a Windows 10 Universal Application, the sensors get the raw data and format it into a JSON string. That string is then shuttled off to the Azure IoT Hub, where it gathers the data and is then displayed in a chart using Power BI. The JSON string is sent to the IoT Hub in one of two ways: packaged into an AMQP message or in a REST packet. If you use AMQP, which is the recommended approach, you will need to have the AMQP port open on your firewall/router.

Note: Although AMQP is the recommended approach, at the time this lab was written that protocol was not supported by the Azure IoT Core SDK for UWP (Universal Windows Platform) applications. However, it is expected to be implemented in a short time, since it’s currently under development.

This lab includes the following tasks:

Setup

The following sections are intended to setup your environment to be able to create and run your solutions with Windows 10 IoT Core.

Setting up your Software

To setup your Windows 10 IoT Core development PC, you first need to install the following:

  • Windows 10 (build 10240) or better
  • Visual Studio 2015 or above – Community Edition is sufficient.  NOTE: If you choose to install a different edition of VS 2015, make sure to do a Custom install and select the checkbox Universal Windows App Development Tools -> Tools and Windows SDK.  You can validate your Visual Studio installation by selecting Help > About Microsoft Visual Studio. The required version of Visual Studio is 14.0.23107.0 D14Rel. The required version of Visual Studio Tools for Universal Windows Apps is 14.0.23121.00 D14OOB.
  • Windows IoT Core Project Templates. You can download them from here. Alternatively, the templates can be found by searching for Windows IoT Core Project Templates in the Visual Studio Gallery or directly from Visual Studio in the Extension and Updates dialog (Tools > Extensions and Updates > Online).
  • Make sure you’ve enabled developer mode in Windows 10 by following these instructions.
  • To register your devices in the Azure IoT Hub Service and to monitor the communication between them you need to install the Azure Device Explorer.

Setting up your Devices

For this project, you will need the following:

  • Your PC running Windows 10, RTM build or later
  • An Ethernet port on the PC, or an auto-crossover USB->Ethernet adapter like the Belkin F4U047.
  • Standard Ethernet cable
  • A good 16GB or 32GB Class 10 SD card. We recommend Samsung or Sandisk. Other cards will usually work, but tend to die more quickly.

To setup your devices perform the following steps:

1.  Plug the GHI FEZ HAT into the Raspberry Pi 2.The FEZ hat connected to the Raspberry Pi 2 device

2.  Get a Windows 10 IoT Core SD Card or download the Windows 10 IoT Core image as per the instructions on https://developer.microsoft.com/en-us/windows/iot/GetStarted, be sure to follow the steps to mount the image, and run the installer on your development PC. If you already have the OS image on a card, you still need to follow this step to get the IoT Core Watcher and Visual Studio templates on to your PC.

3.  Once you have the image on the card, insert the micro SD card in the Raspberry Pi device.

4.  Connect the Raspberry Pi to a power supply, optionally a keyboard, mouse and monitor, and use the Ethernet cable to connect your device and your development PC. You can do it by plugging in one end of the spare Ethernet cable to the extra Ethernet port on your PC, and the other end of the cable to the Ethernet port on your IoT Core device. (Do this using an on-board port or an auto-crossover USB->Ethernet interface.)schematic windows 10 iot core and azure iot hubs hands on lab

5.  Wait for the OS to boot.

6.  Run the Windows 10 IoT Core Watcher utility (installed in step 2) in your development PC and copy your Raspberry Pi IP address by right-clicking on the detected device and selecting Copy IP Address.

For more detail: Windows 10 IoT Core and Azure IoT Hubs : Hands-on Lab


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top