See LICENSE.md for license terms and conditions.
This sample application is distributed as part of the Intel® XDK. It can also be downloaded or cloned directly from its git repo on the public Intel XDK GitHub* site.
For help getting started developing applications with the Intel XDK, please start with the Intel XDK documentation.
See also, the mraa library documentation for details regarding supported boards and the mraa library API and the upm library documentation for information regarding the upm sensor and actuator library APIs.
This sample app demonstrates how to retrieve data from the Microsoft Azure Hub. This app assumes you have run the "IoT Device to Hub App" and stored collected data in your Microsoft Azure Hub account, which this app will retrieve and display on the Node.js console.
NOTE: You can get your Microsoft Azure Hub membership by going to the Azure Portal. For this app you do not need a full subscription to the service - you can use the free trial. For a detailed tutorial on how to setup your Azure IoT hub, see: Setup Azure IoT Hub
Download and unzip a copy of the project files and put it into an easily accessible folder on your workstation.
-
Start the Intel XDK and select "Open an Intel XDK Project” from the Projects tab (see the image below).
-
Locate the folder that contains the "IoT-Hub-to-Device" project you downloaded and unzipped and select the file with the
.xdk
extension.
Modify the connection.json
file to specify the connection string information
that is unique to your hub. The information shown below will not work, you must
change it to match your IoT hub connection identification information:
{
"HOST_NAME": "your-hostname",
"SHARE_ACCESS_NAME": "shared-access-key-name",
"FIRST_KEY": "shared-access-key"
}
To get your shared access key, goto your IoT Hub > Shared Access Policies > IoT Hub Owner > Connection String - Primary.
After all hardware and software configuration are complete, be sure to configure your IoT board's network interface so it has access to the Internet.
- main.js
- package.json
- connection.json
- README.md
- LICENSE.md
- <project-name>.xdk
This sample should run on any IoT Node.js development platform, because it does not require any sensor hardware.