Remote Monitoring with AZ3166 IOT Developer Kit

Send status of sensors on DevKit to Azure IoT Suite for monitoring.

In this tutorial, you learn how to run a sample app on AZ3166 IOT Developer Kit to send sensor data to your Azure IoT Suite.

What you need

Finish the Getting Started Guideto:

● Have your DevKit connected to WiFi

● Prepare the development environment

An active Azure subscription. If you do not have one, you can register via one of the methods:

● Activate a free 30-day trial Microsoft Azure account

● Claim your Azure credit if you are MSDN or Visual Studio subscriber

Step 1. Create an Azure IoT Suite

1. Go to Azure IoT Suite site and click Create a new solution.

2. Select Remote monitoring.

3. Enter a solution name, select a subscription and a region, and then click Create solution. The solution may take a while to be provisioned.

4. After the provision is completed, click Launch. Some simulated devices are created for the solution during the provision process. Click DEVICES to check them out.

5. Click ADD A DEVICE.

6. Click Add NewforCustom Device.

7. Click Let me define my own Device ID, enter AZ3166, and then click Create.

8. Make a note of IoT Hub Hostname, and click Done.

Step 2. Open the RemoteMonitoring sample

1. Disconnect DevKit from your computer if it is connected.

2. Launch VS Code.

3. Connect DevKit to your computer. VS Code automatically detects your DevKit and opens the following pages:

    ● Preview The DevKit introduction page.

    ● Arduino Examples: Hands-on samples to get started with DevKit.

4. On the Arduino Examples page, expand Examples for MXCHIP AZ3166 > AzureIoT, and then click RemoteMonitoring. The RemoteMonitoring sample opens in a new VS Code window.

If the Arduino Examples page doesn’t show up, open it by the following steps:

1. Press Ctrl+Shift+P (macOS: Cmd+Shift+P) to open the command palette.

2. In the command palette, type Arduino, and then click Arduino: Examples.

Step 3. Provision required Azure services

1. In the RemoteMonitoring sample window, use Ctrl+P (macOS: Cmd+P), type task cloud, and then click cloud-provision. The cloud-provision task opens an interactive command line that guides you through provisioning the required Azure services.

2. In the interactive command line, select the IoT hub represented by the IoT Hub Hostname that you noted down.

3. Wait for the provision to complete.

Step 4. Upload the RemoteMonitoring sample to DevKit

1. In the RemoteMonitoring sample window, use Ctrl+P (macOS: Cmd+P), type task device, and then click device-upload. The interactive command line prompts you to set DevKit to configuration mode.

2. On DevKit, press and hold button A, press the Reset button and then release button A. The screen should display Configuration if DevKit is running in configuration mode.

3. Wait for the upload to complete. Once the upload is completed, DevKit restarts and runs the sample.

Test the project

When the sample app runs, DevKit sends sensor data over Wi-Fi to your Azure IoT Suite. To see the result, follow these steps:

1. Go to your Azure IoT Suite, and click DASHBOARD.

2. Azure IoT Suite solution console, you will see DevKit sensor status.

View sensor information within Azure IoT Suite.

Problems and feedback

You can find FAQs if you encounter problems or reach out to us from the channels below.

(This article is reproduced with the tutorial from Microsoft website. Thanks!)

junjia.chenSep 03,2017 15:33 PMAdd Comment


Popular Topics