Skip to content

ScantyDaemon/rpicpufanScantyDaemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Raspberry Pi cpu Fan + shutdown button

rip cpu fan + shutdown button

1.Use cheep transistor like bc547.

2.Connect emiter transistor pin to pin 2 gpio.

3.cpu fan "+" pin connect to transistor, "-" pin connect to any GND.

4.For shutdown button use resistor 1kom-3kom and connect to pin 18 gpio and any and pin.

  1. download python 3 and all dependencies.

  2. make new systemcl daemon with following code and change "NAMEOFYOURSERVICE" on your name:

nano /lib/systemd/system/NAMEOFYOURSERVICE.service

Then paste this code:

#=================================================

[Unit]

Description=NAMEOFYOURSERVICE Service

After=multi-user.target

Conflicts=[email protected]

[Service]

Type=simple

ExecStart=/usr/bin/python3 /home/pi/temp.py

StandardInput=tty-force

[Install]

WantedBy=multi-user.target

#===============================================

  1. copy file temp.py into /home/pi/temp.py

  2. Load Ned deamon with command: systemctl daemon-reload

  3. systemctl start NAMEOFYOURSERVICE

  4. systemctl status NAMEOFYOURSERVICE

AND REMEMBER! PASPBERRY PI HAVEN'T ANY PROTECTION FROM SHORT CIRCUT!!!

About

rip cpu fan + shutdown button

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages