The gpio interface

gpio allows access to a specific GPIO pin. The interface is restricted because it provides privileged access to GPIO hardware.

Auto-connect: no

  • number (slot): GPIO pin number to export and expose to consuming snaps

Snaps that want to consume a gpio device simply plugs: [ gpio ] and the gpio device to connect is specified during interface connection. Available gpio devices for the system can be seen with snap connections. Once connected, the consuming snap can use the device via /sys/class/gpio/gpioN where N is the pin number specified by the connected slot.

This is a snap interface. See Interface management and Supported interfaces for further details on how interfaces are used.

Last updated 5 months ago. Help improve this document in the forum.