using pyA64 library for development but getting permission error on gpio.init() function.
don't understand how to solve this.
BTW i'm new to linux development.
please help!
thanks in advance.
Follow chapter 8.5 from this guide:
https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
I've already read it and it works with sysfs but when i write a python code with pyA64 library it gives permission error.
followed all directions to install python too but didn work for me.
error persist.
Did you export the GPIO you are testing with? Did you try with other GPIOs?
from pyA64.gpio import gpio
from pyA64.gpio import port
from pyA64.gpio import connector
#pin = port.PE15
pin = (5-1)*32+15
gpio.init()
gpio.setcfg(pin, gpio.OUTPUT)
gpio.output(pin, 1)
this is the code.
gpio143 already exported and its shows in list.
ERROR : gpio.init()
PermissionError: [Error 13] Permission denied
Even other pins I've tried but same error occurs.
Do i need to do anything else for this error?
If that's Linux error 13 it's a lack of permission.
John
Thanks Guys for Help.
Finally, its working.
I changed permission of every file of pyA64 and it worked.
But there's one issue with it is, pin PB0 to PB4 isnt working with it.
Is there any solution to this?
The problem is in the pyA64 project. It is outdated, it was made for Armbian and probably is not updated for Olimage images.
Check this old thread for the same issue:
https://www.olimex.com/forum/index.php?topic=8046.0
Okay thnx.