Created
March 25, 2022 17:07
-
-
Save Lessica/30240b63ac0e47d80a919209ea006c60 to your computer and use it in GitHub Desktop.
Configure Raspberry Pi + Argon One Case for Lineage OS
This file contains hidden or 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
#!/system/bin/sh | |
sleeptime=120 | |
while true | |
do | |
cputemp=$(cat /sys/class/thermal/thermal_zone0/temp) | |
if [[ $cputemp -lt 55000 ]]; then | |
fanspeed="0x00" | |
elif [ $cputemp -ge 55000 -a $cputemp -lt 60000 ]; then | |
fanspeed="0x10" | |
elif [ $cputemp -ge 60000 -a $cputemp -lt 65000 ]; then | |
fanspeed="0x32" | |
elif [ $cputemp -ge 65000 ]; then | |
fanspeed="0x64" | |
fi | |
i2cget -y 1 0x01a $fanspeed | |
sleep $sleeptime | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using the case as it came, where should I copy this file to? thanks