Has anyone ever managed to control an output pin on a raspberry pi 3 B+?
Don't laugh!

Using python gpiozero [2] a few days ago produced crash output
indicating 4 different ways of accessing IO pins were tried and all
failed. [1] (Running as root worked no better.)

Now the same thing dies with

  Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/gpiozero/pins/pi.py", line 71, in pin
      pin = self.pins[n]
  KeyError: 4
  During handling of the above exception, another exception occurred:
  ...
    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

indicating someone's relying on what looks like proprietory kernel
extensions.

Trying wiringpi means installing the whole gcc lafaffel, on a minimal
system.

Is there a something like a 3-liner cli program that can flick an output
pin on request and JUST WORKS(TM) on openSUSE? (leap 15)

Thanks,

Volker


[1]
/usr/lib/python3.6/site-packages/gpiozero/devices.py:452: PinFactoryFallback: 
Falling back from rpigpio: module 'RPi.GPIO' has no attribute 'IN'
  'Falling back from %s: %s' % (name, str(e))))
/usr/lib/python3.6/site-packages/gpiozero/devices.py:452: PinFactoryFallback: 
Falling back from rpio: No module named 'RPIO'
  'Falling back from %s: %s' % (name, str(e))))
/usr/lib/python3.6/site-packages/gpiozero/devices.py:452: PinFactoryFallback: 
Falling back from pigpio: failed to connect to localhost:8888
  'Falling back from %s: %s' % (name, str(e))))
/usr/lib/python3.6/site-packages/gpiozero/devices.py:452: PinFactoryFallback: 
Falling back from native: unable to open /dev/gpiomem or /dev/mem; upgrade your 
kernel or run as root
  'Falling back from %s: %s' % (name, str(e))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can't connect to pigpio at localhost(8888)

Did you start the pigpio daemon? E.g. sudo pigpiod

Did you specify the correct Pi host/port in the environment
variables PIGPIO_ADDR/PIGPIO_PORT?
E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888

Did you specify the correct Pi host/port in the
pigpio.pi() function? E.g. pigpio.pi('soft', 8888)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Traceback (most recent call last):
  File "./pi-out-set", line 7, in <module>
    from gpiozero import LED
  File "/usr/lib/python3.6/site-packages/gpiozero/__init__.py", line 22, in 
<module>
    from .devices import (
  File "/usr/lib/python3.6/site-packages/gpiozero/devices.py", line 486, in 
<module>
    Device.pin_factory = _default_pin_factory()
  File "/usr/lib/python3.6/site-packages/gpiozero/devices.py", line 453, in 
_default_pin_factory
    raise BadPinFactory('Unable to load any default pin factory!')
gpiozero.exc.BadPinFactory: Unable to load any default pin factory!


[2]
from gpiozero import LED
import sys
out = LED(4)
state = sys.argv[1]
if state == "on" or state == "1":
    out.on()
else:
    out.off()


-- 
Volker Kuhlmann
http://volker.top.geek.nz/      Please do not CC list postings to me.
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to