Power On Button and Fan For Pi4 Without Code - MEHDIMYADI/PI-4 GitHub Wiki
Power On Button for turn on Pi4 and Fan For Pi4 no code required (Python).
Step 1: Parts Needed
For this project, we will use only a few components that are usually included in electronics kits for hobbyist that you can find on stores
- Raspberry Pi 4.
- 5V Fan.
- NPN transistor that supports at least 300mA, like a 2N2222A.
- 1K resistor.
- 1 diode.
- Micro Switch
Step 2: Electrical Connections
Step 3: Edit boot/config.txt
add enable_uart=1 to config.txt and reboot Pi4, Now The fan is always on if Pi 4 is turned on.
Final result
Enjoy!