Some code to control a fan with a RaspberryPi and a few sensors.