Python GPIO handling

Started by Corto, March 13, 2014, 02:48:39 PM

Previous topic - Next topic

Corto

I've installed the pyA20 module for Python to handle with GPIO on my Olinuxino A20.
The module is not documented except for the (otdated) mini-tutorials on the OLIMEX blog so I have some questions, maybe someone with more experience than me can have the answers...

I found the only way to run a python script using GPIO without errors is to launch it as root...Is there a way to use GPIO without root permissions?

Does anyone try to use the module with python 3?

What is the purpose of the cleanup() function?

Thank you all!

Mouchon

Hi,
Indeed this only possible to use it as root because the /dev/mem is used to map gpio registers to let application access it. I dont think that you can do that as normal user.

The goal of the cleanup() is to clean and free the mapping

Not yet try to use it with python 3, but should not be a problem.