Hi list,

slowly trying to get known with my Pi 4 running Tumbleweed.
I added a fan, and wanted to control it via GPIO.  But I fail to actually
control the pins :(

I was trying to follow this description:
https://howchoo.com/g/ote2mjkzzta/control-raspberry-pi-fan-temperature-python
that uses GIOP17.  So I installed the needed 'gpiozero' python package using
pip.

Trying the command 'pinout' that is part of it results in an error:

Unable to initialize GPIO Zero. This usually means that you are not running
pinout on a Raspberry Pi. If you still wish to run pinout, set the
GPIOZERO_PIN_FACTORY environment variable to 'mock' and retry, or refer to the
Remote GPIO section of the manual* to configure your environment to remotely
access your Pi.

So I export GPIOZERO_PIN_FACTORY=mock, then I get a pinout listed, I can run
python, and with
 from gpiozero import OutputDevice
 fan = OutputDevice(17)
I can use fan.on(), fan.off() or fan.value to set/read the state.
Just the pin doesn't do anything, it always stays low :(

So I wanted to get most basic and tried
 echo 17 > /sys/class/gpio/export
but that gave me only "write error: Invalid argument"

Indeed the directory only lists
  Pi4:~ # ls /sys/class/gpio
  export  gpiochip446  gpiochip454  unexport

which suggests lowest GPIO available is 446!?

What am I missing?

Reply via email to