UWP App and the Azure IoT Hub

Want to play with the Azure IoT Hub but don't have an IoT device? Jon Gallant shows off a way you can do so with a simple UWP App, making it look pretty darn easy...

How to Get Started with Azure IoT Hub and a UWP App

Here’s a quick post on how to get setup with Azure IoT Hub with a UWP App.  These steps and code taken from Olivier Bloch’s Build Talk:

1. Create a new Azure IoT Hub – Free Tier – in Azure Portal http://portal.azure.com

...

2. Install the Azure IoT Hub Device Explorer Windows app – you’ll use this to view and send messages that come and go through the IoT Hub.

...

3. In VS2015, create a new UWP app

...

4. Add a connection to your IoT Hub via References –> Add Connected Service

...

Open MainPage.xml.cs and add this code – receive and send messages to the IoT Hub vai the AzureIoTHub helper.

...

Compile and Run the VS Project.

...

Open the Data tab in Device Explorer and click the Monitor button

When you want to send a message to the device, go to the Device Explorer, Messages To Devices tab, enter your message and click Send.

image

That should get you going with a very basic connection between a UWP and IoT Hub.

[Click through to read the whole thing]



Tags:

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
    Unsubscribing
    Subscribing

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.