Changes

Jump to navigation Jump to search

X728-script

928 bytes added, 10:35, 27 July 2023
===Set and Read the RTC time===
Refer to [[How to enable RTC]]
==How to Use GPIO to control battery charging==
1. This feature is only newly added from '''Version 2.5'''
 
2. This feature is only suitable for advanced players, if you are not familiar with Linux, we do not recommend you to use this feature. For beginners, it is enough to short the ''''CHG Ctrl'''' so that the X728 v2.5 shield will automatically charge when the power adapter is connected
 
If you want to control battery charging through GPIO, please refer to the instructions below:
<pre style="color:blue">
"CHG Ctrl" - Short : battery automatic charging when powe adapter connected
"CHG Ctrl" - Open : GPIO16 output stays high: Charging enabled, GPIO16 output stays low : Charging disabled
 
# Sample shell command
echo "16" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio16/direction
 
# Enable charging
echo "1" > /sys/class/gpio/gpio16/value
 
# Disable charging
echo "0" > /sys/class/gpio/gpio16/value
</pre>
==Support==

Navigation menu