What is IoT Hub?
Azure IoT Hub - Microsoft
IoT Hub is a Platform-as-a-Services (PaaS) managed service, hosted in the cloud, that acts as a central message hub for bi-directional communication between an IoT application and the devices it manages.
Step 1. Create an IoT Hub
- Go to your Azure Portal, on the dashboard, you will see IoT Hub, click on it.
- On the IoT Hub page, click on create. For your first time, you would be required to create a new resource group. Create a name for your IoT Hub also then click on Review + Create.
Click on Create and wait for it to successfully deploy.
After the deployment must have been completed, go to resource.
Step 2. Add an IoT device.
- Scroll down to the usage section and you will see that all message counts are zero. Click on the device section to add a device.
Give your IoT Hub device a name and save. When it must have saved completely, click on the device you just created.
When you open the device, copy the primary connection string.
Step 3. Test the device using the Raspberry Pi Simulator.
- What is a Raspberry Pi used for? The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. Search Raspberry Pi online simulator on Google. When the simulator comes up, check the code section in line 15. Clear everything inside the quote sign and paste your primary connection string, then run the code; you will notice that the red bulb that was not blinking before starts blinking. Then go back to the resource of your IoT Hub device, under the usage section and you will see that the message counts that were zero before have increased. This means that you did the right thing.
Top comments (0)