Received a FanShim by Pimoroni ordered from AdaFruit. This fan for the Raspberry Pi 4 slips onto the Pi 2x20 header without taking up much room and provided options to control the fan based on the temperature of the processor. The bad news is that the interface conflicts with other project requirements. The FanShim uses five of the header GPIO pins, 3, 14, 15, 17 and 18. This gives software control over the function of the onboard push-button, RGB LED and the fan. Critically, pin 3 is also used by the I2C, (Inter-Integrated Circuit), interface which is used by the Pi to communicate with the Servo HAT and 3 Servo Bonnets. {I should have read more carefully!} This conflict prevents using the FanShim. I am using pins 17 and 18 to control two of the signal LEDs, also used by the FanShim. The hardware diagram shows this conflict.


As an alternative to the Fan Shim I have a small 5vdc fan that can get power from and be controlled by one of the "unused" servo drivers (with some circuitry). Only 60 of the available 64 servo controls are needed for semaphores. I can use one of the few remaining GPIO pins to connect a push button to control the fan and use a corner of the unicorn display to replace the FanShim RGB LED to indicate relative temperature, fan on/off and manual/auto mode of operation. The available FanShim library and software can be a starting point.


The push button has two functions:

  1. With 'press and hold' the button can change the fan from auto mode to manual on/off
  2. In manual mode, a button click can toggle the fan from on to off. 


Got a test push button/software working. Found a nice button in the parts box and have a mount built.


Getting two unicorns to work is next.