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
#!/bin/bash | |
c_FAN=26 # gpio pin the fan is connected to | |
c_MIN_TEMPERATURE=45 # temperature in degrees c when fan should turn on | |
c_TEMPERATURE_OFFSET=2 # temperarute offset in degrees c when fan should turn off | |
c_HARDDRIVE="sda" # name of your harddrive | |
temperature_offset=$(( $c_MIN_TEMPERATURE - $c_TEMPERATURE_OFFSET )) | |
fan_state=0 |