Skip to content

Instantly share code, notes, and snippets.

@zentala
Last active February 21, 2021 03:19
Show Gist options
  • Save zentala/ef2997a77d23fd1903975ddb5897e26f to your computer and use it in GitHub Desktop.
Save zentala/ef2997a77d23fd1903975ddb5897e26f to your computer and use it in GitHub Desktop.
Make I2C acccesible without sudo & preserve that setting
# $ sudo addgroup i2c && sudo usermod -G i2c "$USER"
# $ sudo vim /lib/udev/rules.d/60-i2c-tools.rules
KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660"
# Device restart required.
# Tested with Ubuntu 20.04 on Raspberry Pi.
#
# https://lexruee.ch/setting-i2c-permissions-for-non-root-users.html
# https://www.raspberrypi.org/forums/viewtopic.php?t=26212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment