Difference between revisions of "X708-Software"
Line 27: | Line 27: | ||
sudo apt-get install i2c-tools | sudo apt-get install i2c-tools | ||
− | 3. Download | + | 3. Download x708 setup scripts: |
− | git clone https://github.com/geekworm-com/ | + | git clone https://github.com/geekworm-com/x708.git |
− | cd | + | cd x708 |
− | + | chmod +x x708.sh | |
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
4. Install script&reboot: | 4. Install script&reboot: | ||
− | sudo bash | + | sudo bash x708.sh |
− | printf "%s\n" "alias | + | printf "%s\n" "alias x708off='sudo x708softsd.sh'" >> ~/.bashrc |
sudo reboot | sudo reboot | ||
6. How to reading battery voltage and percentage, this is the sample code, you can modify it by your request. | 6. How to reading battery voltage and percentage, this is the sample code, you can modify it by your request. | ||
− | sudo python | + | sudo python x708bat.py |
− | 7. | + | 7. How to power off command on Raspbian from software |
− | + | x708off | |
8. Testing AC power off/loss or power adapter failure detection (need to shor the 'PLD' pin) | 8. Testing AC power off/loss or power adapter failure detection (need to shor the 'PLD' pin) | ||
− | sudo python | + | sudo python x708pld.py |
Revision as of 18:58, 30 October 2020
X708 script is same as X728, but X708 doesn't support RTC function, so we use the same script only remove RTC support script
The following test is base on '2020-02-13-raspbian-buster.img'
Python version: V2.7
1. Enable I2C funcion on Raspbian:
sudo raspi-config
Select 5 Interfacing Options and then P5 I2C - Enable/Disable automatic loading. A prompt will appear asking Would you like the ARM I2C interface to be enabled?, select "Yes"
Select "OK"
Select "Finish" to return to the command line and reboot your raspberry pi.
sudo reboot
2. Install necessary software (python and i2c tool library)
sudo apt-get install python-smbus sudo apt-get install i2c-tools
3. Download x708 setup scripts:
git clone https://github.com/geekworm-com/x708.git cd x708 chmod +x x708.sh
4. Install script&reboot:
sudo bash x708.sh printf "%s\n" "alias x708off='sudo x708softsd.sh'" >> ~/.bashrc sudo reboot
6. How to reading battery voltage and percentage, this is the sample code, you can modify it by your request.
sudo python x708bat.py
7. How to power off command on Raspbian from software
x708off
8. Testing AC power off/loss or power adapter failure detection (need to shor the 'PLD' pin)
sudo python x708pld.py
Return to X708
Enable comment auto-refresher
Anonymous user #32
Permalink |
Anonymous user #20
Permalink |
Anonymous user #30
Permalink |
Anonymous user #31
Anonymous user #29
Permalink |
Lisa
Anonymous user #28
Permalink |
Cindy
Anonymous user #28
Anonymous user #27
Permalink |
Lisa
Anonymous user #26
Permalink |
Anonymous user #25
Permalink |
Anonymous user #25
Permalink |
Anonymous user #23
Permalink |
Lisa
Anonymous user #24
Anonymous user #22
Permalink |
Lisa
Anonymous user #20
Permalink |
Anonymous user #20
Anonymous user #20
Permalink |
Anonymous user #21
Anonymous user #19
Permalink |
Anonymous user #18
Permalink |
Lisa
Anonymous user #17
Permalink |
Anonymous user #16
Permalink |
Lisa
Anonymous user #15
Permalink |
Lisa
Anonymous user #14
Permalink |
Harry
Harry
Anonymous user #11
Permalink |
Anonymous user #12
Anonymous user #11
Permalink |
Anonymous user #10
Permalink |
Anonymous user #13
Anonymous user #13
Anonymous user #9
Permalink |
Lisa
Anonymous user #9
Permalink |
Harry
Anonymous user #8
Permalink |
Lisa
Anonymous user #7
Permalink |
Lisa
Anonymous user #6
Permalink |
Lisa
Anonymous user #5
Permalink |
Lisa
Anonymous user #4
Permalink |
Xiali
Anonymous user #3
Permalink |
Anonymous user #3
Xiali
Harry
Permalink |
Georgefeichter
Permalink |
Georgefeichter
Permalink |
Anonymous user #1
Permalink |
Anonymous user #2