Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Nkaum Devinput.lircd.conf
- Kauj ruam 2: Rub tawm.conf Cov Ntaub Ntawv rau Koj Cov Chaw Taws Teeb
- Kauj ruam 3: Python Code
Video: Teeb Yooj Yim IR Kev Tswj Chaw Taws Teeb Siv LIRC rau Raspberry PI (RPi) - Lub Xya Hli 2019 [Ntu 2]: 3 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Hauv Ntu 1 Kuv tau qhia yuav ua li cas sib sau RPi + VS1838b thiab teeb tsa Raspbian's LIRC module kom tau txais IR cov lus txib los ntawm IR chaw taws teeb. Txhua qhov teeb meem kho vajtse thiab LIRC teeb tsa tau tham hauv ntu 1. Ntu 2 yuav qhia pom yuav ua li cas cuam tshuam nrog kho vajtse + LIRC module peb teeb tsa hauv Tshooj 1 nrog nab hab sej.
Tej thaj chaw deb [IR Tau Txais + RPI] LIRC Pythondisplay (lossis xa).
Khoom siv
tsis muaj
Kauj Ruam 1: Nkaum Devinput.lircd.conf
Koj cov ntaub ntawv teeb tsa nyob deb yuav muab tso rau hauv /etc/lirc/lircd.conf.d cov npe. LIRC yuav pom cov ntaub ntawv hauv phau ntawv no tsuav nws muaj qhov txuas.conf (piv txwv li: JVC.lircd.conf). Peb yuav tsis siv cov ntaub ntawv devinput.lircd.conf yog li peb yuav zais nws los ntawm kev hloov qhov txuas ntxiv raws li hauv qab no los ntawm kev hloov npe devinput.lircd.conf rau devinput.lircd.conf.copy
$ sudo mv /etc/lirc/lircd.conf.d/devinput.lircd.conf /etc/lirc/lircd.conf.d/devinput.lircd.conf.copy
Kauj ruam 2: Rub tawm.conf Cov Ntaub Ntawv rau Koj Cov Chaw Taws Teeb
Nyob deb ntawm txoj hauv kev yooj yim kom tau txais cov ntaub ntawv nyob deb.conf yog rub nws los ntawm lub tsev qiv ntawv loj ntawm lirc.sourceforge.net Txawm hais tias koj tus qauv nyob deb tsis tau teev npe nws yog qhov zoo heev uas lwm tus qauv los ntawm tib lub chaw tsim khoom yuav ua haujlwm zoo. Tsuas yog nrhiav cov chaw tsim khoom ntawm koj lub chaw taws teeb thiab nyem rau ntawm tus qauv uas ze. Yog tias koj tsis paub meej tias tus qauv twg nyob ze koj tuaj yeem saib cov ntsiab lus ntawm txhua tus qauv thiab nrhiav ib qho uas ze rau koj li.
Txoj hauv kev nyuaj kom tau txais.conf cov ntaub ntawv yog los tsim koj tus kheej siv cov cuab yeej tsim nyob hauv lub kaw lus tab sis kuv tsis tau ua tiav los sim tsim cov ntawv siv cov khoom siv no txawm tias siv zog ntau npaum li cas. Muaj ntau ntau lwm tus neeg uas muaj teeb meem zoo li siv irrecord thiab kuv pom zoo kom txoj hauv kev yooj yim ntawm rub tawm.conf cov ntaub ntawv los ntawm lirc.sourceforge.net
Koj cov ntaub ntawv teeb tsa nyob deb yuav muab tso rau hauv /etc/lirc/lircd.conf.d cov npe. LIRC yuav pom cov ntaub ntawv hauv phau ntawv no tsuav nws muaj qhov txuas.conf (piv txwv li: JVC.lircd.conf).
Kauj ruam 3: Python Code
Nov yog qee qhov chaws los sim.
los ntawm lirc ntshuam RawConnection
def txheej txheem IRRemote ():
#get IR hais kom ua #keypress hom = (hexcode, repeat_num, command_key, remote_id) sim: keypress = conn.readline (.0001) tshwj tsis yog: keypress = "" yog (keypress! = "" thiab keypress! = Tsis muaj): data = keypress.split () ntu = cov ntaub ntawv [1] hais kom ua = cov ntaub ntawv [2] #ignore hais kom rov ua dua yog (ntu! = "00"): rov luam tawm (hais kom ua)
#define Ntiaj Teb
cov = RawConnection ()
print ("Pib Pib …")
thaum Muaj Tseeb:
Txheej txheem IRRemote ()
Pom zoo:
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: 4 Cov Kauj Ruam (nrog Duab)
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: Hnub no kuv xav qhia yuav ua li cas kom pom lub teeb pom kev zoo los ntawm lub zog xa hluav taws xob tsis siv hluav taws xob los ntawm tus txhuam txhuam hniav thiab lub tshuab solenoid valve coils uas tau khaws los ntawm scrapyard.Ua ntej pib, thov saib cov vis dis aus hauv qab no:
Ordinary Cov Khoom Siv Hluav Taws Xob Hloov pauv mus rau Plaub-channel RC Qho Chaw Taws Teeb Chaw Taws Teeb: 4 Cov Kauj Ruam
Ordinary Cov Khoom Siv Hluav Taws Xob hloov pauv mus rau plaub-channel RC Toy Remote Control: 将 将 通用 遥控 器 转换 转换 玩具 玩具 模型 使用 的 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62方法 方法 非常。 只需 准备 一些 瓦楞纸 瓦楞纸 板 板 , , , 然后 然后
DIY MusiLED, Music Synchronized LEDs Nrog Ib-nias Windows & Linux Application (32-ntsis & 64-ntsis). Yooj Yim Rov Ua Dua, Siv Yooj Yim, Yooj Yim rau Chaw Nres Nkoj: 3 Kauj Ruam
DIY MusiLED, Music Synchronized LEDs Nrog Ib-nias Windows & Linux Application (32-ntsis & 64-ntsis). Yooj Yim Rov Ua Dua, Siv Yooj Yim, Yooj Yim rau Chaw Nres Nkoj: Qhov haujlwm no yuav pab koj txuas 18 LEDs (6 Liab + 6 Xiav + 6 Daj) rau koj lub Rooj Tswjhwm Saib Arduino thiab txheeb xyuas koj lub khoos phis tawj Lub Suab Suab Lub suab lub sijhawm tiag tiag thiab xa lawv mus rau cov LEDs kom pom lawv raws li qhov cuam tshuam (Snare, High Hat, Kick)
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS YOOJ YIM: 4 Cov Kauj Ruam
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS: Nyob zoo txhua tus hauv cov lus qhia no kuv yuav qhia koj yuav ua li cas kom yooj yim " SOIL DRYNESS SENSOR ". Qhuav ntawm cov av tau txheeb xyuas siv qhov taw qhia coj. Lub teeb ci wi
MediaCenter Yooj Yim thiab Kev Tswj Chaw Taws Teeb Nrog Kev Txhim Kho Kev Siv: 6 Cov Kauj Ruam
Yooj Yim MediaCenter thiab Kev Tswj Chaw Taws Teeb Nrog Kev Txhim Kho Kev Siv Tau: Yog, qhov ntawd yog lwm qhov DIY PC-based Media-Center (lossis HTPC), tab sis nrog ib tus yam ntxwv tshwj xeeb: nws damn yooj yim los tswj, yog li haum rau cov neeg laus, cov neeg xiam oob qhab, lossis tsuas yog cov neeg siv tub nkeeg. Los ntawm Wikipedia: “