To establish a communication between a Rasperry Pi and Azure you need an existing IoT Hub. After you have to register your device in the IoT hub:
- In your IoT hub navigation menu, open IoT devices , then click Add a device to your IoT hub.
- Enter a Device ID for the new device and click Save.
- Figure: Create IoT Device
- The device is created, open the device from the list in the IoT devices
- Copy the Connection string — primary key to use later. This string is used for the communication progress.