Open main menu
Geekworm Wiki
Search
Changes
← Older edit
Newer edit →
X728-script
67 bytes added
,
22 March
→How to Use GPIO16 to control battery charging
GPIO=16
# Read the /sys/kernel/debug/gpio file to get the actual GPIO pin
GPIO=$(cat /sys/kernel/debug/gpio | grep "GPIO$GPIO" | awk -F'gpio-' '{print $2}' | awk -F' ' '{print $1}')
echo "$GPIO" > /sys/class/gpio$GPIO/export
Harry
Bureaucrats
,
Comment administrators
,
Interface administrators
,
Administrators
5,154
edits