Fan controller code for an MHacks project