Difference between revisions of "X885-software"
(Created page with "{{GD Template Impl}} ==Overview== 1. Update software & Install dependencies sudo apt-get update sudo apt-get -y upgrade sudo apt-get -y install i2c-tools python3-smbus python...") |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{GD Template Impl}} | {{GD Template Impl}} | ||
− | + | ||
+ | <big>Although this tutorial is still available, but we strongly recommend that you use [[XScript]] new tutorial, and we no longer maintain this page</big> | ||
+ | |||
+ | |||
+ | <hr> | ||
+ | |||
+ | First, you need to log into your Raspberry Pi 4 host via ssh | ||
1. Update software & Install dependencies | 1. Update software & Install dependencies | ||
− | sudo apt-get update | + | sudo apt-get update |
− | sudo apt-get -y upgrade | + | sudo apt-get -y upgrade |
− | sudo apt-get -y install i2c-tools python3-smbus python3-rpi.gpio | + | sudo apt-get -y install i2c-tools python3-smbus python3-rpi.gpio |
2. Setting up the power management script | 2. Setting up the power management script | ||
Line 11: | Line 17: | ||
cd ~ | cd ~ | ||
git clone https://github.com/geekworm-com/X885 | git clone https://github.com/geekworm-com/X885 | ||
− | cd | + | cd X885 |
chmod +x *.sh | chmod +x *.sh | ||
sudo bash pwr.sh | sudo bash pwr.sh | ||
#Setting up the command to turn off xoff from software | #Setting up the command to turn off xoff from software | ||
− | printf "%s\n" "alias | + | printf "%s\n" "alias xoff='sudo xsoftsd.sh'" >> ~/.bashrc |
#Reboot the Raspberry Pi or '''long press on-board button switch to turn off''' | #Reboot the Raspberry Pi or '''long press on-board button switch to turn off''' | ||
Line 31: | Line 37: | ||
* press on-board blue button 7-8 seconds to force shutdown. | * press on-board blue button 7-8 seconds to force shutdown. | ||
+ | 4. Setting up the PWM cooling fan | ||
+ | <pre> | ||
+ | cd ~ | ||
+ | cd X885 | ||
+ | </pre> | ||
+ | python3 fan.py | ||
+ | |||
+ | 4.1 Run the script at Raspberry Pi boot | ||
+ | sudo crontab -e | ||
+ | [[File:Crontab-step1.png|none]] | ||
+ | |||
+ | Choose "1" then press Enter | ||
+ | |||
+ | 4.2 Add a line at the end of the file that reads like this: | ||
+ | @reboot python3 /home/pi/X885/fan.py | ||
+ | [[File:X885-1.png|800px]] | ||
+ | |||
+ | 4.3 Save and exit. In nano, you do that by hitting CTRL + X, answering Y and hitting Enter when prompted. | ||
+ | |||
+ | PS: Since the PWM fan used has only 3 wires, the x885 cannot read the PWN fan speed value. | ||
+ | |||
+ | |||
+ | You can refer to [[How to add crontab job]] | ||
+ | |||
+ | 5. How to uninstall installation script? | ||
+ | sudo ./uninstall.sh | ||
− | |||
− | + | Return to [[X885]] | |
<!--Add review function! --> | <!--Add review function! --> |
Latest revision as of 16:31, 24 July 2023
Although this tutorial is still available, but we strongly recommend that you use XScript new tutorial, and we no longer maintain this page
First, you need to log into your Raspberry Pi 4 host via ssh
1. Update software & Install dependencies
sudo apt-get update sudo apt-get -y upgrade sudo apt-get -y install i2c-tools python3-smbus python3-rpi.gpio
2. Setting up the power management script
cd ~ git clone https://github.com/geekworm-com/X885 cd X885 chmod +x *.sh sudo bash pwr.sh #Setting up the command to turn off xoff from software printf "%s\n" "alias xoff='sudo xsoftsd.sh'" >> ~/.bashrc #Reboot the Raspberry Pi or '''long press on-board button switch to turn off''' sudo reboot
3. Test safe shutdown command:
xoff
- xoff is safe shutdown command
- press on-board blue button 1-2 seconds to reboot
- press on-board blue button 3 seconds to safe shutdown,
- press on-board blue button 7-8 seconds to force shutdown.
4. Setting up the PWM cooling fan
cd ~ cd X885
python3 fan.py
4.1 Run the script at Raspberry Pi boot
sudo crontab -e
Choose "1" then press Enter
4.2 Add a line at the end of the file that reads like this:
@reboot python3 /home/pi/X885/fan.py
4.3 Save and exit. In nano, you do that by hitting CTRL + X, answering Y and hitting Enter when prompted.
PS: Since the PWM fan used has only 3 wires, the x885 cannot read the PWN fan speed value.
You can refer to How to add crontab job
5. How to uninstall installation script?
sudo ./uninstall.sh
Return to X885
Enable comment auto-refresher
Anonymous user #5
Permalink |
Anonymous user #2
Permalink |
Anonymous user #3
Anonymous user #4
Walker
Anonymous user #4
Walker
Anonymous user #1
Permalink |
Anonymous user #2
Anonymous user #4