Raspberry Pi I2C udev rules

Even when the I2C ports on the Raspberry Pi are enabled as described here, they are only accessible when running in supervisor mode, which is not terribly convenient. To fix that, it’s possible to add a udev rule to change the mode of the devices. The description here is borrowed from my friend at Jumpnow incidentally.

Create a file /etc/udev/rules.d/90-i2c.rules and add the line:

KERNEL=="i2c-[0-7]",MODE="0666"

Reboot the Pi and then the I2C ports will be accessible without having to run stuff with sudo.

Advertisements

4 thoughts on “Raspberry Pi I2C udev rules

Leave a Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s