STEP 1: In the smart search box, type IOT HUB and click on the grayed area which is highlighted.
STEP 2: click on create and you will be directed to a new tab
STEP 3: Fill the descriptions in the tab.
Resource group: If you don't have one you can create a new one but if you do have one, just select your resource group in the resource group tab.
IoT hub name: Give your IoT hub a name that is okay with you.
Region: Select a region that you want. remember to put cost in place when doing this.
then click on review + create. You wait for it to deploy
STEP 4: Open google and search for https://azure-samples.github.io/ A raspberry pi Azure simulator will open for you.
STEP 5: After it's done deploying, click on go to resource
STEP 6: Click on device
STEP 7: For you to create a new device, click on add device
STEP 8: Just give a name to your device ID and leave the rest on default and click on save.
STEP 9: Check the box and click on your device name
STEP 10: scroll down to Primary connection string and copy the key.
The primary connection string is a string of characters or text used to establish a connection to a database or other networked service. It contains information that allows a client application or program to connect to the service.
Step 11: Go to your raspberry pi simulator page, on line 15, clear what you see inside the quotes and just leave the quotes sign. then paste your primary connection string inside the quotes.
STEP 12: Click run. when you do, you wil notice the simulator blinking, it means it has started working and sending messages.
To check if it is sending messages, go back to your Azure tab and click on devices.
Click on overview
Scroll down and check IoT Hub usage box and look at the messages used today, you will notice it keeps increasing.
You are welcome!
Top comments (0)