Changes

Jump to navigation Jump to search

X735 Software

1,775 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 shield based on RASPBIAN. (Not tested on Ubuntu , openmediavault, retropie or other third party OSlike 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
 
After a reboot, we can run ```sudo read_fan_speed.py``` to get an update on the fan's current speed. Nice!
 
'''How to make the fan script run automatically after booting?'''
 
There are two ways to achieve it;
1. Put the following line at the end of .bashrc file: (Default)
cd ~
nano .bashrc
copy the following line to .bashrc file.
 
python /home/pi/x735-v2.5/pwm_fan_control.py &
At this time, the fan is still not rotating, we NOTE: Maybe you need to continue to install modify the pwm fan control scriptfile path if you use other OS.
We can manually run In this way, this line of command will be executed automatically when the following commands: python /home/pi/x735-v2.5/pwm_fan_control.pyThen the x735 fan will start working.user logs in;
But we hope that the script can be executed automatically when the Raspberry Pi board boots, we can use 2. Use crontab system command to achieve itadd a timed task. For details, please refer to the following[[How to add crontab job]].
6==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. How to start PWM fan when pi 4 bootscom/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
sudo crontab -e== For myNode OS and Umbrel ==About myNode, please refer to http://www.mynodebtc.com/
[[FileAbout Umbrel, please refetrto https:Crontab-step1//getumbrel.png]]com/
Choose "1" then press Enter'''Install'''
Add a line at login to mynode teminal via Putty or Xsheel tool, the end of default user name is `admin`, password is `bolt`, then run the file that reads like thisfollowing command:
@reboot python /home/pi/x735-v2.5/pwm_fan_control.pyLogin to mynode teminal via Putty or Xsheel tool, the default user name is `umbrel`, default password is `moneyprintergobrrr`, then run the following command:
Please note the path of this file.'''FAQ'''
[[FileQ:Crontab-step2.png]]What are the credentials to SSH into my Umbrel?
Save and exit A: ssh umbrel@umbrel.local (CTRK + O and ENTER to save itor ssh umbrel@<IP address of your Umbrel>). In nano editor, The password is the same as your Umbrel's password. If you do that by hitting CTRL + Xhaven't set a password yet, answering Y and hitting Enter when promptedthe default password is: moneyprintergobrrr.
== How to read the fan RPM?==<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.gpioplease refer to git clone https://homegithub.com/pigeekworm-com/x735-v2.5 cd x735-v2.5 chmod +x *.sh sudo bash install-mynode.sh echo "alias x735off='sudo /usr/local/bin/x735softsd.sh'" >> ~/read_fan_speed.py, bashrc sudo reboot</pre> ''' PWM fan control''' The script is installed successfully and this is only show how the fan starts to run '''Test safe shutdown''' x735off* Please run 'x735off' to get shut down or press the fan speed every second, on-board button switch to shut down. <span style="color:red;">DON'T run the following 'shutdown' linux commandto shut down, otherwise the power of x735 will not be shut down.</span>* press button switch 1-2 seconds to reboot* press button switch sudo python /home/pi/x7353 seconds to safe shutdown,* press 7-v2.5/read_fan_speed8 seconds to force shutdown.py
'''uninstall'''
./uninstall-mynode.sh
Return to [[X735]]

Navigation menu