Ask Your Question
0

Access i2c from a node, need sudo permission

asked 2019-06-10 01:32:18 -0500

AutoCar gravatar image

Hi, my robot uses Jetson tx2 and there is a segment LED linked to tx2 i2c. From my ros node, I need to write something to the LED. I used libi2c in my c++ program to send data to LED. I just found however, I need to be a superuser to access i2c from my node. How can I run my node with "sudo"?

Thanks,

edit retag flag offensive close merge delete

Comments

I just found however, I need to be a superuser to access i2c from my node.

I've not setup something like this myself, but are you sure root access is necessary?

Searching for libi2c no root leads me to (among others) Setting up I2C on Armbian/Odroid C1 which seems to suggest it should be possible to set things up such that non-root access is also possible.

gvdhoorn gravatar imagegvdhoorn ( 2019-06-10 02:12:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-20 10:15:57 -0500

ssnover gravatar image

In Ubuntu, you can install the i2c-tools package which creates the i2c group on the system. Then with sudo usermod -aG i2c $USER you can add the current user to that group and you should be able to use the i2c buses without root.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-06-10 01:32:18 -0500

Seen: 153 times

Last updated: Jun 20