Open main menu

Changes

X735-script

2,448 bytes added, 10 April
===Other===
<code>pwm_fan_control.py</code> is no longer used, and are reserved here for research and use by python lovers only.
==How to make the fan run after upgrading umbrel to 1.0==
 
Above X735-script mainly implements three functions of [[X735]] hardware:
 
1. '''Fan service''': Use shell scripts or other high-level languages such as python to control the pwm fan; (corresponding to the wiki page https://wiki.geekworm.com/X735-script#Create_the_x735-fan_service)
 
2. '''Power management service''': Use the shell to detect the user's keystrokes in real time to perform a safe shutdown or restart; (corresponding to https://wiki.geekworm.com/X735-script#Create_the_x735-pwr_service)
 
3. '''Software shutdown service''': Provides a shell script to implement command line shutdown (corresponding to https://wiki.geekworm.com/X735-script#Prepair_software_shutdown_script)
 
Among them, the purpose of editing '''config.txt''' is to support the x735 fan service. Since the '''/boot''' directory of '''umbrel''' is read-only, we cannot edit the config.txt file, so we cannot use the method provided on our wiki page to install the x735 fan service. , that is, after you install the fan service, the fan of the X735 will still not run; but the other two functions can be used. You only need to follow the above steps on the current page to achieve '''pressing button to shutdown''' and '''software command line shutdown'''; (PS: After the installation is completed, you can '''press the key for 3 seconds''' to test whether the safe shutdown of the X735 is working properly).
 
Now let us solve the problem of pwm fan not running in umbrel 1.0:
 
We can use python code to make the fan run. There is a pwm_fan_control.py file in the x735-script directory. You can run python3 pwm_fan_control.py to make the fan run, it's that simple.
 
After the fan runs successfully, we need to let the python3 pwm_fan_control.py command run automatically after booting, so we need to modify the x735-fan.service file as follows:
cd
cd x735-script
nano x735-fan.service
[[File:X735-fan-service-umbrel.png]]
 
Press Ctrl + O to save this file.
 
Press Ctrl +X to exit nano editor.
 
Then execute '''sudo ./install-fan-service.sh''' to install fan service script.
 
It should be noted that since the '''pwm_fan_control.py''' file uses the '''RPi.GPIO''' python library, you need to install this python dependencies package in advance:
sudo apt-get install -y python3-rpi.gpio
 
Finally, as a reminder, please remove the local x735-script folder and then re-execute the above installation process.
 
==Support==
If you have some questions or suggestions, please contact to <span class="tb_red">support@geekworm.com</span>