My try at automatic fan control on my Macbook

Last week didn’t go very well (missing the last day of publication studio being a major reason), and I seriously felt overheating was a big factor, if not the factor. So I spent the last couple of days hacking up some code for automatic fan control. So far the code seems to be working. As to whether the triple beeps will now go away, I’ll cross my fingers. (Many thanks to the people who wrote the smc utility and who wrote all the web pages detailing how to make sense of sleep, hibernation, and all the sensors…)