Op dinsdag 4 september 2018 04:51:25 CEST schreef Volker Kuhlmann:
> > File "/usr/lib/python3.6/site-packages/gpiozero/pins/local.py", line
> > 67, in _get_revision>
> > raise PinUnknownPi('unable to locate Pi revision in /proc/cpuinfo')
> >
> > gpiozero.exc.PinUnknownPi: unable to locate Pi revision in /proc/cpuinfo
>
> Hardcoding the version into the python2 file
> /usr/lib/python2.7/site-packages/gpiozero/pins/local.py
>
> exits with I/O error on /dev/mem when the few lines of python are run as
> user (ok fine), and segfaults when run as root.
>
> Volker
Sometime ago I needed to read input on a GPIO pin. I found a problem in the
kernel of openSUSE to access these pins compared to what is documented for
Python in Raspbian.
The problem is apparent when you do "ls /sys/class/gpio/". At least you need
to see gpiochipN there, where N is some number. On my Raspberry Pi A with
openSUSE it is 298. Raspbian has 0.
The Python library RPi.GPIO needs to use this N to address the right pin. This
also means that the right /sys/class/gpio/gpioM needs to be used for a certain
pin.
--
fr.gr.
member openSUSE
Freek de Kruijf
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]