This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#elevate to root to ensure no permission errors | |
#[ `whoami` = root ] || exec su -c $0 root | |
if [[ $EUID -ne 0 ]]; then | |
echo "i2cset usually needs sudo powers to run, please login if prompted to avoid permission errors" | |
exec sudo $0 | |
fi | |
echo "Set all Port A pins (GPA0-7) as outputs..." |