Yuvaram Singh Posted March 8, 2018 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
TonyMac32 Posted March 8, 2018 Posted March 8, 2018 The userspace GPIO driver is not implemented yet, so root is necessary.
Tido Posted March 8, 2018 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/
Yuvaram Singh Posted March 8, 2018 Author 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 .
Yuvaram Singh Posted March 8, 2018 Author 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
Recommended Posts