DEV Community

Cover image for How To Implement Iot Hub With Raspberry Pi
olaniyi akinkunmi
olaniyi akinkunmi

Posted on

2

How To Implement Iot Hub With Raspberry Pi

(check my previous post if you don't know how to create Iot Hub)
Step 1 After creating Iot Hub click on device manager then device as shown below
you can see we have zero device zero message
Image description
Then click add device
Image description
Step 2 give your device a name and save
Image description
Step 3 click the device created and copy the primary connection sting _
Image description
Image description
Step 4 _Go to web search for raspberry pi stimulator and open

Image description
you can see our diode is not working yet
Image description
Step 5 go to the code section (number 15) paste the primary connection string you copy and run
Image description
paste the code like this
Image description
You can see our diode has started blinking shows its working
Image description

Step 6 go back to your created Iot Hub in Azure and refresh
you can see we 1 device connected and 123 messages

Image description

yes we did it, follow for more tips.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs