I want to (de)activate a fan, which is connected to the pins 4 and 6, depending on the temperature of the CPU.
Is it possible to (de)activate Pin 4 (or Pin 2) at the Raspberry Pi 4 via python? I have already read this article: How to turn power off on 5V dc gpio pin with python, but is there another way just via python, without using a transistor?