Changes

Jump to navigation Jump to search

X708-Software

138 bytes added, 15:17, 27 April 2022
no edit summary
4. Install the script for power management
 4.1 Enters the corresponding operating system scripts folder (raspberry-pi-os)
'''cd x708v2/raspberry-pi-os'''
4.2 Execute the installation script.
sudo bash pwr.sh
This command will generate 2 power management script files as follows:
 
*/etc/x708pwr.sh
*/usr/local/bin/x708softsd.sh
4.3 Create an alias x708off so that we can perform software shutdown from the command line, you can also change x708off to any name you like
printf "%s\n" "alias x708off='sudo x708softsd.sh'" >> ~/.bashrc
sudo reboot
Or force press the button of x708 for 8 seconds to shut down and then restart
4.4 Test software shutdown from command line after restart.
x708off
X708 Shutting down...
6. How to reading battery voltage and percentage, this is the sample code, you can modify it by your request.
sudo python x708bat.py

Navigation menu