#AzureIoT – Granting access to Raspberry Pi GPIO from an ☁ Azure IoT Edge Module

Buy Me A Coffee

Hi !

Today let’s face a cool question:

How do I grant GPIO access in a Raspberry Pi to an Azure IoT Module?

So, the main goal is to access the GPIO to interact with sensors and actors. Usually, when we run programs in the device that’s easy to accomplish, however running an Azure IoT Module we need to grant these permissions to the module definition.

In the Container Create Options, we need to add the following lines:

{
  "HostConfig": {
    "Binds":[
        "/dev/i2c-1:/dev/i2c-1"
        ],
    "Privileged": true
  }
}

Enabling access to the i2c and also running the module with elevated privileges:

And, of course, if the module is also running as a HTTP server, you need to add here the TCP open ports, and more. That’s it! super easy!

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.

More info in https://beacons.ai/elbruno



Azure ☁ IoT

Create an Azure IoT Module using Raspberry Pi and Grove Sensors

  1. Raspberry Pi + Grove Sensors, read temperature and humidity values
  2. Raspberry Pi + Grove Sensors, send temperature and humidity values as telemetry to Azure IoT Hub
  3. Raspberry Pi + Grove Sensors, create a Azure IoT Module to send temperature and humidity values as telemetry to Azure IoT Hub
  4. Raspberry Pi + Grove Sensors, publish and use the Azure IoT Module
  5. Raspberry Pi + Grove Sensors, notes on build and configuration
  6. Raspberry Pi + Grove Sensors, details on how to send a telemetry message and sample messages

Create an Azure IoT Module from Azure Custom Vision project


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Advertisement

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: