Problem: Fan control - GPIO pins not working
|
26th Apr, 2020, 10:46 PM
Post: #1
|
|||
|
|||
Fan control - GPIO pins not working
How does one control a fan under xbian?
I'm running Linux xbian 4.19.90+ #1 SMP PREEMPT Wed Dec 18 20:39:10 CET 2019 armv7l GNU/Linux on a Raspberry Pi 3. For all my other Raspberry Pi's, I've attached a fan for PID CPU temperature control which is PWM modulated via a GPIO pin through a python script. It works flawlessly on my other Pi's. First thing I notice is that python says Terminal ImportError: No module named RPi.GPIO So I try Terminal pip install RPi.GPIO Turns out that pip is not installed. So I go to https://pip.pypa.io/en/stable/installing/ which says to run Terminal curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py Turns out that curl is not installed. So I run Terminal sudo apt install curl and then Terminal sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py and then Terminal sudo pip install RPi.GPIO which gives me LOTS of errors. Then I say to myself: If I can just turn on the fan, at least I can cool the CPU. But it turns out that even Terminal sudo echo 1 > /sys/class/gpio/gpio17/value gives me "Access denied". How does one control a fan under xbian? |
|||
29th Apr, 2020, 10:06 PM
Post: #2
|
|||
|
|||
RE: Fan control - GPIO pins not working
Good question. Maybe you have to figure out first why sudo pip install RPi.GPIO creates a lot of errors
|
|||
31st Aug, 2021, 02:35 AM
Post: #3
|
|||
|
|||
RE: Fan control - GPIO pins not working
For the record, the easiest way to install RPi.GPIO is with
Terminal sudo xbian-config To install a pre-release of RPi.GPIO, do Terminal sudo apt-get install python-dev Terminal pip install RPi.GPIO==[version] By the way, 0.7.1a4 or later is needed for Raspberry 4 support. I forgot to mention that root is currently needed on xbian for GPIO access. See https://github.com/xbianonpi/xbian/issues/898 for non root access. |
|||
« Next Oldest | Next Newest »
|