Changes

Jump to navigation Jump to search

X735 Software

2,044 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 OS like Manjaro,RoninDojo.)
==How to setup safe shutdown 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 &
 
NOTE: Maybe you need to modify the file path if you use other OS.
== Other python sample code== read_fan_speed.py This is only show how to get In this way, this line of command will be executed automatically when the fan speed every second. sudo python read_fan_speed.pyuser logs in;
2. Use crontab to add a timed task. For details, please refer to [[How to add crontab job]]. ==For DietPi=='''install''' pwm_fan_controlsudo 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.py 5 This is the phthon sample file to control fan speed by CPU temperaturecd x735-v2. you can refer to this sample or modify it by your request5 sudo chmod +x *. please contact us if you found some error for this filesh sudo bash install-dietpi.sh
You can use the echo "alias x735off='crontabsudo /usr/local/bin/x735softsd' system command to execute this python file to get the function of speed adjustment according to temperature changes" >> ~/.bashrc sudo reboot
==For myNode OS and Umbrel =How =About myNode, please refer to use crontab command===http://www.mynodebtc.com/
sudo crontab -eAbout Umbrel, please refetrto https://getumbrel.com/
[[File:Crontab-step1.png]]'''Install'''
Choose "1" login to mynode teminal via Putty or Xsheel tool, the default user name is `admin`, password is `bolt`, then press Enterrun 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:
Add a line at the end of the file that reads like this:'''FAQ'''
@reboot python3 /home/pi/X735-V2.5/pwm_fan_control.pyQ: What are the credentials to SSH into my Umbrel?
Please note A: ssh umbrel@umbrel.local (or ssh umbrel@<IP address of your Umbrel>). The password is the path of this filesame as your Umbrel's password. If you haven't set a password yet, the default password is: moneyprintergobrrr.
[[File:Crontab-step2.png]]<pre>
Save and exit 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. In nano editor, you do that by hitting CTRL 5 chmod + X, answering Y 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 hitting Enter when prompted.the fan starts to run
'''Test safe shutdown'''
x735off
* Please run 'x735off' to shut down or press the on-board button switch to shut down. <span style="color:red;">DON'T run the 'shutdown' linux command to shut down, otherwise 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,
* press 7-8 seconds to force shutdown.
'''uninstall'''
./uninstall-mynode.sh
Return to [[X735]]
<!--Add review function! -->
<comments />

Navigation menu