Files
beagleconnect-freedom/sw/toggle_gp_led.sh
2020-09-10 13:24:33 -04:00

8 lines
207 B
Bash
Executable File

#!/bin/bash
if (( $EUID != 0 )); then
sudo $0
exit
fi
CHIP=`gpiodetect | grep "greybus_gpio" | awk '{print $1}'`
VAL=0; for ((;;)); do VAL=$((VAL^1)); echo $VAL | gpioset ${CHIP} 6=${VAL}; sleep 1; done