I have installed Libreelec 9.2.1 on Pi 4 with cooling fan that is connected to GPIO 4 (red) and 6 (black) directly without a transistor. I wanted to control this fan depending on the temperature of CPU. Found some information on internet, and based on these i programmed the Pi as the following:
Created a file fancontrol.py in /storage/.config/ with access 755.
It contains the following script
Then i made another file named fancontrol.sh in /storage/.config/ with access 755
Lastly i created an autostart.sh file in /storage/.config/ with
I have reboot the pi, but the fan is not controlled, it is non stop works with cpu temperature 35.
What did i do wrong? How to make it work?