Changes

Jump to navigation Jump to search

X735 Software

1,952 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??=='''install''' 1. Once you have logged into Assuming your Raspberry Pi from the command linesystem is updated, run the following commandsadd these packages: sudo apt-get update sudo aptinstall -get install y python-smbuspython sudo apt-get install -y pigpio python-pigpio python3-pigpiogit git clone https://github.com/geekworm-com/x735-v2.5 cd x735-v2.5 sudo chmod +x *.sh sudo bash install.sh echo "alias x735off='sudo x735softsd.sh'" >> ~/.bashrc sudo reboot '''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?'''
2There are two ways to achieve it;1. Download script and some sample codePut the following line at the end of .bashrc file: (Default) cd ~ git clone https://githubnano .com/geekworm-com/x735-v2bashrccopy the following line to .5bashrc file.git
wget https:python /home/raw.githubusercontent.com/suptronicspi/x725_V2x735-v2.5/main/x735v25pwm_fan_control.shpy &
3NOTE: Maybe you need to modify the file path if you use other OS. Setup script. cd x735-v2.5 sudo chmod +x x735-v25.sh sudo bash x735-v25.sh printf "%s\n" "alias x735off='sudo x735softsd.sh'" >> ~/.bashrc
4. Reboot sudo rebootIn this way, this line of command will be executed automatically when the user logs in;
52. Use crontab to add a timed task. For details, please refer to [[How to add crontab job]]. Test safe shutdown x735off
== Other python sample codeFor DietPi==<pre>'''install''' #read_fan_speed.pysudo apt-get install -y python-smbus python #This is only show how to sudo apt-get the fan speed every second.install -y pigpio python-pigpio python3-pigpio git sudo python read_fan_speedgit clone https://github.py<com/geekworm-com/pre>x735-v2.5 pwm_fan_controlcd x735-v2.py 5 This is the phthon sample file to control fan speed by CPU temperaturesudo chmod +x *. you can refer to this sample or modify it by your request. 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 " >> ~/.bashrc sudo reboot == For myNode OS and Umbrel ==About myNode, please refer to execute this python file to get the function of speed adjustment according to temperature changeshttp://www.mynodebtc.com/
===How to use crontab command===About Umbrel, please refetrto https://getumbrel.com/
sudo crontab -e'''Install'''
[[Filelogin to mynode teminal via Putty or Xsheel tool, the default user name is `admin`, password is `bolt`, then run the following command:Crontab-step1.png]]
Choose "1" Login to mynode teminal via Putty or Xsheel tool, the default user name is `umbrel`, default password is `moneyprintergobrrr`, then press Enterrun the following command:
'''FAQ'''
Add a line at Q: What are the end of the file that reads like this:credentials to SSH into my Umbrel?
A: ssh umbrel@reboot python3 /home/pi/X735-V2umbrel.5/pwm_fan_controllocal (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.py
Please note the path of this file.<pre>
[[File 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:Crontab//github.com/geekworm-com/x735-v2.5 cd x735-step2v2.5 chmod +x *.sh sudo bash install-mynode.sh echo "alias x735off='sudo /usr/local/bin/x735softsd.sh'" >> ~/.png]]bashrc sudo reboot</pre>
Save ''' PWM fan control''' The script is installed successfully and exit. In nano editor, you do that by hitting CTRL + X, answering Y 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