Creating something to put in a box, it takes the temperature and if it's higher than the maximum temperature that we set, a fan starts cooling

Creating something to put in a box, it takes the temperature and if it's higher than the maximum temperature that we set, a fan starts cooling