Changes

Jump to navigation Jump to search

X735 Software

1,848 bytes added, 16:21, 30 November 2021
{{GD Template Impl}}
==For Raspbian / RetroPie / Twister OS v2.0.2==This guide is only for X735 V2.5 shieldbased on RASPBIAN. (Not tested on Ubuntu, openmediavault, retropie or other third party OS like Manjaro,RoninDojo.)
==How to setup script??==1. Once you have logged into your Raspberry Pi from the command line, run the following commands sudo apt-get update sudo apt-get '''install python-smbus sudo apt-get install pigpio python-pigpio python3-pigpio'''
2. Download script and some sample code.Assuming your system is updated, add these packages: sudo apt-get install -y python-smbus python sudo apt-get install -y pigpio python-pigpio python3-pigpio git git clone https://github.com/geekworm-com/x735-v2.5.git 3. Setup script.
cd x735-v2.5
sudo chmod +x x735-v25*.sh sudo bash x735-v25install.sh printf "%s\n" echo "alias x735off='sudo x735softsd.sh'" >> ~/.bashrc 4. Reboot
sudo reboot
5. '''Test safe shutdown'''
x735off
* x735off is safe shutdown command, you can run this command to safe shutdown.
* press button 1-2 seconds to reboot
* press button 3 seconds to safe shutdown,
* press 7-8 seconds to force shutdown.
 
'''uninstall'''
sudo ./uninstall.sh
 
'''read-fan-speed.py'''
sudo ./read_fan_speed
At this time, the fan is still not rotatingAfter a reboot, we need to continue can run ```sudo read_fan_speed.py``` to install get an update on the pwm fan control script's current speed. Nice!
We can manually run '''How to make the following commands: python /home/pi/x735-v2.5/pwm_fan_control.pyThen the x735 fan will start working.script run automatically after booting?'''
But we hope that the script can be executed automatically when the Raspberry Pi board boots, we can use crontab system command There are two ways to achieve it;1. Put the following line at the end of . please refer to bashrc file: (Default) cd ~ nano .bashrccopy the followingline to .bashrc file.
6python /home/pi/x735-v2. How to start PWM fan when pi 4 boots5/pwm_fan_control.py &
sudo crontab -eNOTE: Maybe you need to modify the file path if you use other OS.
[[File:Crontab-step1.png]]In this way, this line of command will be executed automatically when the user logs in;
Choose "1" then press Enter2. Use crontab to add a timed task. For details, please refer to [[How to add crontab job]].
Add a line at the end of the file that reads like this==For DietPi=='''install''' sudo apt-get install -y python-smbus python sudo apt-get install -y pigpio python-pigpio python3-pigpio git git clone https://github.com/geekworm-com/x735-v2.5 cd x735-v2.5 sudo chmod +x *.sh sudo bash install-dietpi.sh echo "alias x735off='sudo /usr/local/bin/x735softsd'" >> ~/.bashrc sudo reboot
@reboot python3 == For myNode OS and Umbrel ==About myNode, please refer to http:/home/pi/x735-v2www.mynodebtc.5com/pwm_fan_control.py
Please note the path of this fileAbout Umbrel, please refetrto https://getumbrel.com/
[[File:Crontab-step2.png]]'''Install'''
Save and exit login to mynode teminal via Putty or Xsheel tool, the default user name is `admin`, password is `bolt`, then run the following command: Login to mynode teminal via Putty or Xsheel tool, the default user name is `umbrel`, default password is `moneyprintergobrrr`, then run the following command: '''FAQ''' Q: What are the credentials to SSH into my Umbrel? A: ssh umbrel@umbrel.local (CTRK or ssh umbrel@<IP address of your Umbrel>). The password is the same as your Umbrel's password. If you haven't set a password yet, the default password is: moneyprintergobrrr. <pre>  sudo apt-get update sudo apt-get install -y python-smbus python pigpio python-pigpio python3-pigpio git wiringpi sudo apt-get install -y python-rpi.gpio rpi.gpio git clone https://github.com/geekworm-com/x735-v2.5 cd x735-v2.5 chmod + O x *.sh sudo bash install-mynode.sh echo "alias x735off='sudo /usr/local/bin/x735softsd.sh'" >> ~/.bashrc sudo reboot</pre> ''' PWM fan control''' The script is installed successfully and ENTER the fan starts to run '''Test safe shutdown''' x735off* Please run 'x735off' to shut down or press the on-board button switch to save it)shut down. In nano editor<span style="color:red;">DON'T run the 'shutdown' linux command to shut down, you do that by hitting CTRL + Xotherwise the power of x735 will not be shut down.</span>* press button switch 1-2 seconds to reboot* press button switch 3 seconds to safe shutdown, answering Y and hitting Enter when prompted* press 7-8 seconds to force shutdown.
== How to read the fan RPM?=='''uninstall'''please refer to /home/pi/x735-v2.5/read_fan_speed.py, and this is only show how to get the fan speed every second, run the following command . sudo python /home/pi/x735uninstall-v2.5/read_fan_speedmynode.pysh
Return to [[X735]]
<!--Add review function! -->
<comments />

Navigation menu