Initial experience with Microsoft IoT Starter Kit Development-feedback control and data storage

Source: Internet
Author: User

In the previous article, "Microsoft IoT Starter Kit development experience," we described the hardware introduction, development environment building, hardware setup, connection to Azure IoT hub, and program compilation for Microsoft IoT Starter Kit released by Microsoft China. , download and debug, Powerbi data display. In this article, you'll learn more about the message feedback control of cloud to device and how to store the data in Azure Storage Table with Stream analytics for ease of use later in the data.

1. Feedback control

In the previous article, the message flow from device to cloud was validated, that is, devices send data to Azure Iothub. In fact, Azure Iothub supports two-way transmission of data, that is, the device can also receive messages sent by Iothub, thus achieving the purpose of feedback control. (Earlier azure Eventhub only supported message flows from device to cloud, and if the scenario only needed to send device to cloud messages, then Azure Eventhub would suffice). The Microsoft IoT Starter kit contains a chainable RGB led that can be used to demonstrate the functionality of feedback control.

First, open device Explore, and navigate to the message to device page as shown in.

Then, enter the control command in the message in the following format:

{"Name": "setrgbled", "Parameters": {"rgbled":255}}

The underlined content can be determined according to the color of the lamp you want to control: Red is 0xff0000, decimal value is 16711680, Green is 0x00ff00, the corresponding decimal value is 65280, Blue is 0x0000ff, and the corresponding decimal value is 255.

When the command is sent as above 65280, device explore prompts the appliance to receive the message successfully, and then confirms that the LED lamp color has turned green. As shown in.

2. Data storage

Stream analytics not only outputs data to Powerbi, it can also be set up to output data streams to azure Storage table to prepare for subsequent data processing. Here's how to set it up.

First, create a new storage account in the Azure portal, and download the Azure Storage Explorer tool locally to connect to Azure Storage Table. Open the Azure Storage Explorer tool locally and add the account via the Add accounts as shown in.

Then, in tables, create a new table to store the Seeeduino data, as shown in seeeduinotable, for example.

Next, in the Azure portal, configure the output of stream analytics. Configure as seeeduinotable by adding new output, as shown in.

Once added, Azure automatically tests the connection to the table. As shown in.

If there is no problem, power up the Seeeduino to see if Azure Iothub has data input.

Then see if stream Analytics has data input and output, as shown in.

If there is no problem, see if you have Seeeduino data through the Azure Storage Explorer tool. As shown in.

3. Summary

Now, through these two articles, the hardware, development environment, hardware setup, connectivity of the Azure IoT Hub, the compilation, download and debugging of D2C data, the sending of c2d feedback control, the Starter of the software, The presentation of POWERBI data and the storage of Azure Storage table data. Based on this, developers can extend more sensors and actuators through the Grove interface, combined with Azure Iothub, to do more.

Initial experience with Microsoft IoT Starter Kit Development-feedback control and data storage

Related Article

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.