Cov txheej txheem:

Pi Shutdown Module: 3 Kauj Ruam
Pi Shutdown Module: 3 Kauj Ruam

Video: Pi Shutdown Module: 3 Kauj Ruam

Video: Pi Shutdown Module: 3 Kauj Ruam
Video: Install ON/OFF Button for Raspberry Pi 3 - Only takes 5 Minutes 2024, Kaum ib hlis
Anonim
Pi Shutdown Module
Pi Shutdown Module

Cov qauv no muab rau koj txoj hauv kev zoo rau kaw Raspberry Pi kom raug. Tom qab ntawd nws tuaj yeem raug tshem tawm nrog lub khawm ntawm lub zog hloov pauv lossis tshem tawm. Lub teeb yuav tua thaum nws muaj kev nyab xeeb rau tua hluav taws. Yog tias koj txiav txim siab khau raj tom qab nws tau kaw (thaum nws tseem muaj hwj chim), tsoo lub pob dua yuav rov pib dua.

PCB tsis kim los ntawm OSH Park. Kev txiav txim yam tsawg kawg yog 3, yog li qhia rau phooj ywg lossis muab tso rau ntawm 3 Raspberry Pi's

Kuv tsim qhov no yog li kuv cov menyuam yuav raug kaw RetroPie tom qab ua si.

Kauj Ruam 1: Qhov Chaw

Qhov
Qhov

3 Cov laug cam los ntawm OSH Park $ 6.10 thiab thauj dawb

1 x LED

1x.01uf Capacitor (100nf thiab 104 =.01uf)

1330 Ohm tus tiv thaiv

1 x 1M Ohm Resistor

2x - Lub taub hau 10 tus pin 2x5 (siv 1x thiab kab xev hluav taws xob yog tias Pi muaj lub rhaub dej kub)

1x Khawm Hloov 6x6x9.6 tus lej kawg yog qhov siab ntawm lub pob. Qhov siab sib txawv tuaj yeem hloov pauv tau.

Kauj ruam 2: Tsim

Tsim
Tsim

"UNPLUGGED" ib feem ntawm PCB tau tsim los muab kev txhawb nqa ib sab rau lub rooj tsavxwm thiab xa cov hluav taws xob tawm mus rau 1M resistor. Tom qab kev sib dhos, cov khoom sib txuas ua rau sab hauv qab kom paub tseeb tias tsis luv ntawm Pi.

Yog tias koj muaj lub rhaub dej kub ntawm koj tus Pi, tsis txhob siv lub tshuab "UNPLUGGED" txuas thiab muab daim kab xev hluav taws xob ntawm sab nraum qab ntawm PCB.

Kauj ruam 3: OS Configuration

Nws xav tau kev pabcuam kaw nws thaum koj nias lub pob. Rub tawm tsab ntawv nab npawb

wget -O off.py

chmod +x tawm.py

Teeb tsa kev pabcuam pib

sudo nano /lib/systemd/system/off.service[Chav] Nqe lus piav qhia = Tawm Txoj Haujlwm [Kev Pabcuam] ExecStart =/tsev/pi/off.py StandardOutput = null [Nruab] WantedBy = multi-user.target Alias = off.servic

Txuag, tom qab ntawd ua haujlwm pabcuam

sudo systemctl pab off.service

sudo systemctl pib tawm.service

Nws siv tus lej txuas los teeb lub LED thaum nws ua haujlwm. Yog li nws xav tau cov khoom siv qhib rau hauv Raspberry Config.

sudo raspi-teeb tsa

Pom zoo: