Difference between revisions of "X728-Software"
Line 1: | Line 1: | ||
{{GD Template Impl}} | {{GD Template Impl}} | ||
The following test is base on '2020-02-13-raspbian-buster.img' | The following test is base on '2020-02-13-raspbian-buster.img' | ||
+ | |||
+ | Python version: V2.7 | ||
1. Enable I2C funcion on Raspbian: | 1. Enable I2C funcion on Raspbian: | ||
Line 45: | Line 47: | ||
x728off | x728off | ||
− | 8. Testing AC power off/loss or power adapter failure detection | + | 8. Testing AC power off/loss or power adapter failure detection (need to shor the 'PLD' pin) |
sudo python x728pld.py | sudo python x728pld.py | ||
Revision as of 13:43, 21 April 2020
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 x728 setup scripts:
git clone https://github.com/geekworm-com/x728.git cd x728
4. Install script&reboot:
sudo bash x728.sh printf "%s\n" "alias x728off='sudo x728softsd.sh'" >> ~/.bashrc sudo reboot
5. Set and Read the RTC time
#If you need to set the system time for any reason you can use the following command : date -s "5 MAR 2019 13:00:00" #Write the system date and time to the RTC module after your correct the system date and time : sudo hwclock -w #Read the date and time back from the RTC module: sudo hwclock -r
6. How to reading battery voltage and percentage, this is the sample code, you can modify it by your request.
sudo python x728bat.py
7. Power off command on Raspbian from software
x728off
8. Testing AC power off/loss or power adapter failure detection (need to shor the 'PLD' pin)
sudo python x728pld.py
Enable comment auto-refresher
Anonymous user #39
Permalink |
Walker
Anonymous user #38
Permalink |
Walker
Anonymous user #37
Permalink |
Anonymous user #36
Permalink |
Walker
Anonymous user #33
Permalink |
Lisa
Harry
Anonymous user #31
Permalink |
Anonymous user #32
Anonymous user #34
Lisa
Anonymous user #35
Anonymous user #28
Permalink |
Anonymous user #28
Anonymous user #30
Permalink |
Lisa
Anonymous user #30
Lisa
Anonymous user #27
Permalink |
Anonymous user #28
Anonymous user #29
Anonymous user #28
Anonymous user #35
Anonymous user #27
Permalink |
Anonymous user #26
Permalink |
Lisa
Anonymous user #25
Permalink |
Lisa
Anonymous user #24
Permalink |
Lisa
Anonymous user #23
Permalink |
Lisa
Anonymous user #22
Permalink |
Lisa
Anonymous user #21
Permalink |
Lisa
Anonymous user #20
Permalink |
Lisa
Anonymous user #19
Permalink |
Lisa
Anonymous user #18
Permalink |
Lisa
Anonymous user #18
Anonymous user #18
Anonymous user #17
Permalink |
Lisa
Anonymous user #16
Permalink |
Anonymous user #16
Permalink |
Anonymous user #16
Anonymous user #15
Permalink |
Lisa
Anonymous user #13
Permalink |
Anonymous user #14
Anonymous user #16
Anonymous user #13
Permalink |
Anonymous user #14
Anonymous user #12
Permalink |
Harry
Anonymous user #9
Permalink |
Anonymous user #14
Anonymous user #11
Permalink |
Anonymous user #10
Permalink |
Anonymous user #9
Permalink |
Anonymous user #7
Permalink |
Anonymous user #9
Anonymous user #5
Permalink |
Anonymous user #6
Anonymous user #5
Permalink |
Anonymous user #4
Permalink |
Lisa
Anonymous user #2
Permalink |
Anonymous user #8
Anonymous user #11
Anonymous user #1
Permalink |
Pmsr
Pmsr
Permalink |
Anonymous user #3