I'm really interested in IoT development and am a full stack developer, so this has been an awesome opportunity to start learning about how to send information to and from a "device" and how to handle that. I like the idea of eventually creating a UI that communicates with a web service, to retrieve and send messages to a hub and then have that hub. Then have that hob communicate with my device. This is the start of me building that up.
I am also doing this through Visual Studio as I am a .Net developer. I'm finding the Arduino IDE, Azure NuGet Packages and the ease of having it all in one solution great!
I started off with "Get Started with IoT Hub for .Net" and then incorporated "How to send cloud-to-device messages with IoT Hub and .Net". I have also played around with switching from AMQP to HTTP. I found it easy to change transport type for sending messages, but retrieving has been difficult (I was working on a network that didn't support AMQP, but it's fine on other networks).
The points below will correspond to projects in my solution, so you can see the code used to run these applications. The example images are screen shots of the apps accessing my IoT Hub "IoTDemoSMuller" to send/receive messages.
This is part of the dashboard on Azures portal. You can see I have 1 Device registered with my IoT Hub. The app I wrote is used to create a device identity in the hub's identity registry and return a key that you will need to use to identify your device when communicating with the hub.
Above is a screen shot of my console app reading the messages from my IoT Hub that are sent from my simulated device. There is a lot more to be learnt around this with regards to how to process device-to-cloud messages at scale, but for the purpose of this project, this simple app is sufficient.
I really like this app as it demonstrates sending a message from an application to the IoT Hub an, when you see point 4, that the message is received by my device (cloud-to-device message). It is also able to log a response which is the "Received feedback: Success", so that you can check that your messages have been received.
You can see the JSON objects being sent here. Then on read device-to-cloud messages (point 2), that those objects have been received by the IoT Hub. I have enabled cloud-to-device messaging on my device as well. The yellow line is the message I sent in point 3 (cloud-to-device). This completes the full circle of being able to send/receive messages to a device, read those messages and use another application to send a message to the device.
Where to from here? Adding a real device :)
See "Flashing Lights" for a project that uses Arduino IDE in Visual Studio and a console app that connects to that device via serial port, to communicate user inputs to the device. The app also receives information from the device. I have the projects added to a solution called BlinkLed for development ease, but the actual projects are in the app folder.



