Yuvaram Singh Posted March 8, 2018 Share Posted March 8, 2018 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 More sharing options...
TonyMac32 Posted March 8, 2018 Share Posted March 8, 2018 The userspace GPIO driver is not implemented yet, so root is necessary. Link to comment Share on other sites More sharing options...
Tido Posted March 8, 2018 Share Posted March 8, 2018 3 hours ago, Yuvaram Singh said: by asus 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/ Link to comment Share on other sites More sharing options...
Yuvaram Singh Posted March 8, 2018 Author Share Posted March 8, 2018 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 More sharing options...
Yuvaram Singh Posted March 8, 2018 Author Share Posted March 8, 2018 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 More sharing options...
Recommended Posts