MRR PiFan Slim fan controller module for single board computers For controlling the fan, you can use a script, like this one (Pi Fan Controller). The module can be used as a mini-hat too. See this blog post for more information.