Difference between revisions of "X885-software"

From Geekworm Wiki
Jump to navigation Jump to search
 
(No difference)

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
Crontab-step1.png

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

X885-1.png

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 your comment
Geekworm Wiki welcomes all comments. If you do not want to be anonymous, register or log in. It is free.


Anonymous user #5

8 months ago
Score 0++
On a fresh install of the OS, be sure to 'apt -y install git' before trying to run the first script. It's not installed automatically.

Anonymous user #2

18 months ago
Score 0++

I am currently facing a different problem. Once the HDD is mounted to the RPi OS, the raspberry seems to continiously access the HDD. Any ideas?

As soon as I unmount the HDD, the HDD stops continously clicking

Anonymous user #3

18 months ago
Score 0++
Does your power supply meet the startup current for both (if two are installed) drives and have enough power left to run the board?

Anonymous user #4

14 months ago
Score 0++
I had the same issue. The issue was with insufficient power. HDD draws more power, hence you need to match the power requirement.

Walker

14 months ago
Score 0++

It is recommended to use our 12V 5A 60W high quality power supply:

Psu60-IMG-4703-1.jpg
Our power supply can be purchased here: 12V 5A Power Supply

Anonymous user #4

14 months ago
Score 0++
12V 2.5A adaptor works for me. It will consume 30W instead of 60W.

Walker

14 months ago
Score 0++
ok thank you very much

Anonymous user #1

18 months ago
Score 0++

This isn't working for me, unfortunately. I can get up to step 4, but when I run "python3 fan.py" it brings nothing back. When I stop the process, it says: ^CTraceback (most recent call last): File "/home/[user]/X885/fan.py", line 39, in <module> time.sleep(5) # Sleep for 5 seconds KeyboardInterrupt

I've tried uninstalling and reinstalling the os several times, worked on other steps, but I just can't make it work. Any ideas?

Anonymous user #2

18 months ago
Score 0++
This is the expected behaviour. The description is a bit misleading. You actually have first to cancel the script, then you can set it up as a crontab since it is an infinit script.

Anonymous user #4

14 months ago
Score 0++
The py script is missing the KeyboardInterrupt. Hence you are getting this error. You can modify the script, else just ignore.