I've been trying to set the state of my pins using a variety of solution, all without success.
I've tried wiringpi and gpiozero all return a similar error, this is the latter:
$this->bbcode_second_pass_code('', '
/usr/lib/python3.6/site-packages/gpiozero/devices.py:451: PinFactoryFallback: Falling back from rpigpio: This module can only be run on a Raspberry Pi!
'Falling back from %s: %s' % (name, str(e))))
/usr/lib/python3.6/site-packages/gpiozero/devices.py:451: 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:451: PinFactoryFallback: Falling back from pigpio: No module named 'pigpio'
'Falling back from %s: %s' % (name, str(e))))
/usr/lib/python3.6/site-packages/gpiozero/devices.py:451: 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))))
Traceback (most recent call last):
File "./lampon", line 2, 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 480, in <module>
Device.pin_factory = _default_pin_factory()
File "/usr/lib/python3.6/site-packages/gpiozero/devices.py", line 452, in _default_pin_factory
raise BadPinFactory('Unable to load any default pin factory!')
gpiozero.exc.BadPinFactory: Unable to load any default pin factory!
')
I've read around and there's a few remark of
$this->bbcode_second_pass_code('', '/proc/cpuinfo')
not containing the needed information to identify the board.
Also, I've tried to go and set my pin 'manually' but it seems no pins are present in the
/sys/class/gpio/
the typical command should be
$this->bbcode_second_pass_code('', '# echo 1> /sys/class/gpio/gpio2')
but this is all I have $this->bbcode_second_pass_code('', '
$ ls /sys/class/gpio/
export gpiochip458 unexport')
and
$this->bbcode_second_pass_code('', 'ls /sys/class/gpio/gpiochip458
base device label ngpio power subsystem uevent').
So how can I go to use the pins?