Azure IoT Hub Toolkit supports C#, Go, Java, Node.js, PHP, Python and Ruby to develop Azure IoT application in VS Code


With the latest release of Azure IoT Hub Toolkit, lots of popular languages are supported to quickly create an Azure IoT application in VS Code: C#, Go, Java, Node.js, PHP, Python and Ruby! (Note: For C#, Java, Node.js and Python, it is based on Azure IoT Hub SDK, while for Go, PHP and Ruby, it is based on Azure IoT Hub REST API.) What's your favorite programing language? Which language would you like to develop an Azure IoT application?

For Go, Node.js, PHP, Python and Ruby, the steps are pretty easy, you could follow this blog post to quickly make that.

For C# and Java, there is one more step compared with the previous languages, but it is still easy. Let's see how easy it is to create a Java application for Azure IoT Hub in VS Code.

Prerequisites

Generate Code

  1. Right-click your device and select Generate Code to monitor the device-to-cloud message
  2. In language list, select Java
  3. In code template list, select Send device-to-cloud message
  4. In pop-up file dialog, select the folder for your Java application
  5. A new VS Code window will open

Run Code

  1. Open Integrated Terminal of VS Code
  2. Run mvn clean package to install the required libraries and build the simulated device application
  3. Run java -jar target/simulated-device-1.0.0-with-deps.jar to run the simulated device application
  4. You will see the Java application is running. It is sending the simulated device data to IoT Hub every second.
  5. If you want to monitor the device-to-cloud message in VS Code, you could refer to our Wiki page.

 

If your preferred language is not supported yet, no worry! You could just submit your request in GitHub, or use the REST API to build your application. Let us know what languages you want! Feel free to leave your feedback or suggestion in our GitHub issue !

Useful Resources:

Comments (3)

  1. Informative. Good job keep it up. step by step guide

  2. papatr0ll42 says:

    Why is Go considered a “Scripting Language” instead of a “Compiled language”? It’s actually a compiled language.

    1. Hi papatr0ll42, appreciate your pointing out! I have updated the post to correct this.

Skip to main content