I'm trying to make my case fan turn on using Python code. I have connected the fan to the GPIO 4 pin and the ground pin. The code I'm using is below:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(4, GPIO.OUT)
GPIO.output(4, True)
The fan works with both the 5 V and the 3.3 V pins already, but when I connect it to the GPIO 4 pin, it does not spin!