Jump to content

how to use gpio library provided by asus t=without using sudo keyword


Yuvaram Singh

Recommended Posts

hi ,

i am using the gpio library provided by asus tinker board to work with gpio on armbian os . i am having issue with running the python script without giving sudo cmd. is there any alternative to overcome giving sudo all the time while running gpio python script or any other alternate library to use with armbian

 

python add_event_callback.py 
can't open /dev/mem and /dev/gpiomem
wiringPiSetup: Unable to open /dev/mem and /dev/gpiomem: No such file or directory
Segmentation fault

 

Link to comment
Share on other sites

1 hour ago, Tido said:

how about the one provided by armbian ?

 

User Space IO is Python 3 and Java 8 bindings for user space GPIO, SPI, I2C, PWM and Serial interfaces

https://forum.armbian.com/topic/6523-user-space-io-is-python-3-and-java-8-bindings-for-user-space-gpio-spi-i2c-pwm-and-serial-interfaces/

 

hi , i am working with ROS which used python 2.7 . will the above library work with py 2.7 .

Link to comment
Share on other sites

i found a work around for it . my issue was ros cmds (roscd , rosrun ..) are unrecognized by sudo . so i login as root and edited .bashrc file to include the executable files for those cmds and then ran ros cmds . this time both ros ans the gpio worked perfectly  .

 

http://ros-users.122217.n3.nabble.com/Running-commands-as-SuperUser-td865871.html

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines