Open main menu

Changes

X708-script

643 bytes added, 25 March
-->
Now we think you have successfully flashed the OS Image into Micro SD and and power on the device, and you have also completed the operations such as creating new user required in some OS. You need to perform the following operations in <code>Terminal</code>.
 
'''[NOTE]:'''
 
1. The script now supports the Raspberry Pi OS '''BOOKWORM''' version. You just need to '''uninstall''' the original script and '''reinstall''' it. Please refer to the following:
 
OPen ternimal window, then run the following command:
<pre>
mv x708-script x708-script-old
git clone https://github.com/geekworm-com/x708-script
cd x708-script
chmod +x *.sh
./uninstall.sh
</pre>
Then just follow the installation process below.
==OS that has been tested==
#36 - the address of the battery fuel gauging chip
</PRE>
 
===Install gpiod package===
sudo apt install -y gpiod
===Clone the script===
chmod +x *.sh
</pre>
'''PS''': For some OS such as 'Raspberry Pi OS Lite', the '''git''' tool is not installed by default, if you get an error like '''error: -bash: git: command not found''', please run the following command to install the git tool.
sudo apt install -y git
===Create the x708-pwr service===
x708-pwr service will be responsible for power management and hardware safe shutdown.
<pre>
sudo cp -f ./x708-pwrxPWR.sh /usr/local/bin/sudo cp -f x708-pwr.service /lib/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable x708-pwr
===Prepair software shutdown script===
sudo cp -f ./x708-softsdxSoft.sh /usr/local/bin/Create Then create a alias <code>x708off</code> command to execute the software shutdown
<pre>
echo "alias x708off='sudo /usr/local/bin/x708-softsdxSoft.sh0 13'" >> ~/.bashrc
source ~/.bashrc
</pre>
'''PS:'''
 
Then you can run <code>x708off</code> to execute software shutdown as follows
x708off
==Other resource==
* Chip-Specifications:[[File:MAX17040-MAX17041.pdf]]
*[https://www.sparkfun.com/datasheets/Components/DS1307.pdf I2C address: 0x36 for battery fuel gauging, 0x68 for RTC]*References: [https://www.instructables.com/Raspberry-Pi-Tutorial-How-to-Use-a-Buzzer/ Raspberry Pi Tutorial: How to Use a Buzzer]* [[X728-Software]]
Return to [[X708]] or [[X708-Hardware]]