Cov txheej txheem:
Video: Ntxiv Adafruit's Ring LED Momentary Hloov rau Raspberry Pi: 3 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Raws li ib feem ntawm kuv txoj kab txiav kab, kuv xav tau lub ntsuas hluav taws xob thiab rov pib dua ntawm Raspberry Pi-based media center khiav Kodi ntawm OSMC.
Kuv tau sim ntau qhov hloov pauv hloov pauv ib ntus. Adafruit's Rugged Metal Push Button with Blue LED yog txias heev.
Nov yog thawj ntawm ntau qhov kev qhia, uas yog lub hauv paus ntawm Kodi/OSMC lub kaus mom rau Raspberry Pi.
Hauv txhua qhov kev qhia, Kuv yuav tau txais ib feem ntawm lub kaus mom ua haujlwm thiab kuv xav tias txhua daim ntawm lub kaus mom muaj txiaj ntsig los ntawm nws tus kheej.
Kauj Ruam 1: Sau Qhov Chaw
Qhov tshwj xeeb rau qhov kev qhia no:
- Rugged Hlau Laub Khawm nrog Xiav LED Adafruit $ 4.95
- Kev sib cais luv luv Adafruit $ 4.95
Cov khoom siv tau thiab cov cuab yeej siv tau (tus nqi hauv USD):
- Breadboard Fry's $ 7.99
- Breadboard xov hlau Fry $ 7.99
- Txiv neej rau Poj Niam Jumper Wires Fry $ 3.99
- MacBook Pro (lub PC tuaj yeem siv tau)
- Raspberry Pi 3 Element14 $ 35
- 5.2V 2.1A USB Power Adapter los ntawm Amazon $ 5.99
- Micro USB rau USB cable 3ft los ntawm Amazon $ 4.69
- Case los ntawm Amazon $ 6.99
- SanDisk Ultra 16 GB microSDHC Class 10 nrog Adapter (SDSQUAN-016G-G4A) los ntawm Amazon $ 8.99
- Solder, Solder Station, Tip Cleaner
- TV nrog HDMI chaw nres nkoj, USB keyboard, USB nas, HDMI Cable
Sau ntawv:
- Cov ntawv nyob hauv cov spades, xws li, ♣ replace-this ♣, yuav tsum hloov nrog tus nqi tiag. Tau kawg, tshem cov spades.
- Raspberry Pi yuav tsum tau teeb tsa thiab khiav Kodi/OSMC
-
Adafruit muaj qee qhov "qhia tau zoo", tab sis kuv tsis yooj yim nrhiav. Hauv google, sim:
- ♣ tshawb nrhiav-lus ♣ inurl:
- rugged coj nplhaib inurl:
- Fritzing yog ib qho cuab yeej zoo rau kev ua mov ci
Kauj Ruam 2: Ntiv LED
Hauv kuv daim ntawv thov, lub nplhaib LED yog lub zog ntsuas. Yog tias raspberry pi tau siv thiab ua haujlwm ces Lub Nplhaib LED yuav tsum tau taws (lossis xiav). Yog tias tsis muaj lub zog lossis raspberry pi raug kaw, ces lub nplhaib LED yuav tsum raug tua.
Ntiv nplhaib LED Kev Sib Txuas
Daim ntawv qhia zaub mov tso cai rau kuv sim nrog lub Circuit Court kom txog thaum nws ua haujlwm. Txiv neej-rau-poj niam jumper xov hlau thiab txuas cov xov hlau uas tuaj nrog cov laug cam ua cov txheej txheem no yooj yim dua. Txiv neej-rau-poj niam jumper xov hlau txuas lub khob cij rau raspberry pi.
Ob txoj kev sib txuas sab nraud ntawm Lub Nplhaib Laub khawm tswj lub Nplhaib LED. Lub davhlau ya nyob twg hauv av txuas nrog Raspberry Pi hauv av nrog 330 Ohm resistor. Hauv av yog (-). Thiab GPIO 24 yuav txuas nrog lub davhlau ya nyob twg zoo (+).
Utility software rau sej
Lub Nplhaib LED software xav tau pob rpi.gpio. Cov lus txib hauv qab no rub tawm, tsim thiab teeb tsa rpi.gpio
$ sudo ua
# apt-tau hloov tshiab # apt-tau nruab sej-pip python-dev gcc # pip nruab rpi.gpio # tawm
Tawm rov qab los rau $ sai
Ntiv LED Software
Qhib lub Nplhaib LED
$ sudo nano /usr/local/bin/power_ring_led.py
thiab kho kom raug:
#!/usr/bin/env nab hab sej
ntshuam RPi. GPIO li GPIO ntshuam subprocess ntshuam argparse parser = argparse. ArgumentParser () pab pawg = parser.add_mutually_exclusive_group () group.add_argument ("-l", "--light", ua = "store_true") group.add_argument (" -o "," --off ", action =" store_true ") # Disable ceeb toom GPIO.setwarnings (Cuav) # tig rau gpio pin 24 GPIO.setmode (GPIO. BCM) GPIO.setup (24, GPIO. OUT) args = parser.parse_args () yog args.light: GPIO.output (24, Tseeb) elif args.off: GPIO.output (24, Tsis tseeb)
Ntaus CTRL-o, CTRL-x ENTER kom txuag tau cov ntaub ntawv thiab tawm nano editor
Hloov qhov kev tso cai ntawm cov ntawv
$ sudo chmod 755 /usr/local/bin/power_ring_led.py
Tsim ib tsab ntawv pib:
$ sudo nano /etc/init.d/power_ring_led.sh
thiab kho kom raug:
#!/bin/sh
### Pib INIT INFO # Muab: scriptname # Yuav Tsum-Pib: $ remote_fs $ syslog # Yuav tsum-Nres: $ remote_fs $ syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Pib daemon ntawm lub sijhawm khau raj # Nqe lus piav qhia: Pab kev pabcuam los ntawm daemon. ### Xaus INIT INFO # Pib thiab nres power_ring_led.py # Cov npe: /etc/init.d/power_ring_led.sh # Kev tso cai: chmod 755 /etc/init.d/power_ring_led.sh # Pib lossis nres power_ring_led.py rooj " $ 1 "pib) /usr/local/bin/power_ring_led.py -teeb &;; nres) /usr/local/bin/power_ring_led.py -tawm &;; *) ncha "Siv: /etc/init.d/power_ring_led.sh {pib | nres}" tawm 1;; esac tawm
Ntaus CTRL-o, CTRL-x ENTER kom txuag tau cov ntaub ntawv thiab tawm nano editor
Hloov qhov kev tso cai ntawm cov ntawv
$ sudo chmod 755 /etc/init.d/power_ring_led.sh
Sau npe tsab ntawv kom khiav ntawm khau raj
$ sudo insserv power_ring_led.sh
Pib tsab ntawv
$ sudo /etc/init.d/power_ring_led.sh pib
Lub Nplhaib LED yuav tsum teeb!
Kauj ruam 3: Pib dua Hloov
Pib dua Hloov
Feem ntau, kuv Raspberry Pis khiav txhua lub sijhawm. Raspberry Pi 3 siv lub zog me me heev.
Qhov zoo tshaj, Kuv xav tau lub zog hloov pauv kom ruaj ntseg kaw tus pi, los ntawm kev hu sudo kaw -h 0 ua ntej txiav lub zog. Txawm li cas los xij, kev siv lub hloov hluav taws xob yog qhov nyuaj dua thiab yuav tsis tshua muaj siv.
Nov yog qhov hloov pauv pib, qhov pib, nws rov pib dua Raspberry Pi.
Solder ob tus pin rau Raspberry Pi 3
Ntawm Raspberry Pi 3, nrhiav qhov khiav qhov - saib daim duab, lub npov daj. Cov qhov khiav yog nyob ze ntawm gpio header.
Tshem tawm txhua lub xov tooj (lub zog, HDMI, ethernet, thiab lwm yam) thiab Micro SD daim npav los ntawm Raspberry Pi.
Los ntawm hauv qab ntawm pawg thawj coj saib, txuas ob lub luv luv sib cais txiv neej tus pin los ntawm Kev khiav qhov.
Txuas txhua yam rov qab ua ke thiab xyuas kom nws tseem ua haujlwm.
Txuas N01 (ib txwm qhib) ntawm lub sijhawm hloov pauv mus rau ib qho ntawm Run pins, thiab C1 mus rau lwm tus Pin txuas. NC1 (ib txwm kaw) tsis siv.
Nias lub pob, thiab lub kaw lus yuav tsum rov pib dua!
Pom zoo:
RaspberryPi 3/4 Extension Board rau Ntxiv Cov Nta Ntxiv rau Raspberry Pi: 15 Cov Kauj Ruam (nrog Duab)
RaspberryPi 3/4 Extension Board rau Ntxiv Nta Ntxiv rau Raspberry Pi: peb paub tias raspberry pi 3/4 tsis tuaj nrog ua hauv ADC (analog to digital converter) thiab RTC (lub sijhawm tiag tiag) yog li kuv tsim PCB uas muaj 16 channel 12bit ADC, RTC, SIM7600 4G module, thawb cov nyees khawm, tso tawm, USB fais fab tawm, 5V fais fab tuag, 12V
Casting Yam Kom Paub Ntxiv: Cov Ntiv Tes Ntiv Tes (Uas Glow, Hloov Xim Nrog Tshav Kub, thiab Ntau Ntxiv ): 10 Cov Kauj Ruam (nrog Duab)
Casting Cov Lus Qhia Kom Paub: Cov Ntiv Tes Ntiv Tes (Uas Glow, Hloov Xim Nrog Tshav Kub, thiab Ntau Ntxiv …): Nov yog cov lus qhia hais txog kev nrum cov khoom me me, qhov nyuaj - pheej yig. Nws yuav tsum tau hais tias kuv tsis yog tus kws tshaj lij, tab sis raws li qhov xav tau feem ntau yog leej niam ntawm kev tsim khoom - qee cov txheej txheem ntawm no tau ua haujlwm zoo. Kuv tau ntsib Nigel Ackland ntawm Fest Yav Tom Ntej hauv London, thiab
Txhim Kho Cov Hloov Pauv Hloov Rau Hauv Ntse Kov Hloov Nrog Temp Monitoring: 4 Cov Kauj Ruam
Txhim Kho Qhov Hloov Pauv Hloov Mus Rau Ntse Kov Hloov Nrog Lub Sijhawm Saib Xyuas: Kuv paub txhua tus ntawm koj ntsib qhov teeb meem no tsawg kawg ib qho hauv koj lub neej lub rooj hloov pauv tau tawg los ntawm kev siv tas mus li. ntau lub sijhawm yog lub caij nplooj ntoo hlav sab hauv hloov pauv los yog m
Mods Muaj txiaj ntsig rau Leatherman Tread (Zoo dua haum, Ntxiv cov khoom, Hloov Cov Txiv Neej Tsav Tsheb): 14 Cov Kauj Ruam (nrog Duab)
Muaj txiaj ntsig Mods rau Leatherman Tread (Zoo dua haum, Ntxiv cov khoom, Hloov Cov Txiv Ntoo Tsav Tsheb): Qhov kev txiav txim siab no hla dhau 3 kev hloov pauv rau Leatherman TreadModification #1 - Ua kom zoo dua ntawm koj lub dab teg #2 - Siv koj lub Tread li tus nqa me me thiab DriverModification # 3 - Hloov Cov Txiv Ntoo Tsav Tsheb kom Me Me
Ntxiv Cov Ntawv rau Cov Duab Nrog Linux 'hloov pauv' Hais kom ua: 3 Cov Kauj Ruam
Ntxiv Cov Ntawv rau Cov Duab Nrog Linux 'hloov pauv' Hais kom ua: Cov lus qhia no yuav qhia koj yuav ua li cas ntxiv cov ntawv rau ib daim duab siv cov lus txib hloov pauv hauv Linux. Ib qho muaj txiaj ntsig siv ntawm qhov no yog kev tso cov lus piav qhia ntawm daim duab rau cov ntaub ntawv. Lwm qhov siv yuav yog kev tso lub sijhawm thwj rau ntawm daim duab uas g