Cov txheej txheem:

Xfinity HTPC Wireless Chaw Taws Teeb: 5 Kauj Ruam
Xfinity HTPC Wireless Chaw Taws Teeb: 5 Kauj Ruam

Video: Xfinity HTPC Wireless Chaw Taws Teeb: 5 Kauj Ruam

Video: Xfinity HTPC Wireless Chaw Taws Teeb: 5 Kauj Ruam
Video: Aerb Keyboard Mouse & TV Remote 2024, Hlis ntuj nqeg
Anonim
Xfinity HTPC Wireless Chaw Taws Teeb
Xfinity HTPC Wireless Chaw Taws Teeb

Phau ntawv qhia no yuav qhia koj yuav ua li cas kom tau txais lub teeb liab los ntawm Xfinity chaw taws teeb thiab tom qab ntawd siv nws lub teeb liab ua cov keyboard tsis siv neeg. Kuv tsis muaj Arduino nano, yog li kuv yuav tsum sau ib tsab ntawv nab nab los tig cov ntaub ntawv hauv xov tooj mus rau hauv tus yuam sij. Kuv kuj tseem siv Arduino txhawm rau nias lub hwj huam khawm nrog NPN transistor.

Kauj Ruam 1: Arduino Serial Read

Arduino Serial Nyeem
Arduino Serial Nyeem

Txhawm rau kom tau txais daim ntawv teeb tsa XR8, Arduino yuav tsum xub ua haujlwm kom tau txais cov ntaub ntawv. Kuv hloov Ken Shirriff's IR tau txais Arduino code thiab muab tso rau nws. Tom qab tus lej tau muab tso rau, koj li Arduino tuaj yeem tau txais cov ntaub ntawv xov xwm thiab tso tawm nws hauv kab ntawv saib.

Kauj Ruam 2: Txuas XR8 mus rau Arduino

Txuas Txuas XR8 mus rau Arduino
Txuas Txuas XR8 mus rau Arduino
Txuas Txuas XR8 mus rau Arduino
Txuas Txuas XR8 mus rau Arduino

Tam sim no koj tuaj yeem tau txais cov ntaub ntawv xov xwm, koj yuav tsum txuas lub wireless txais rau arduino. Daim duab qhia pom tus pin-out ntawm XR8. Txuas hauv av rau GND +5 volts mus rau 5 volt tsheb nqaj hlau, thiab TX txhawm rau pin 11 ntawm Arduino. Txhawm rau txuas lub tshuab fais fab khawm, xaim Arduino raws li qhia hauv daim duab thib ob. Feem ntau lub PC motherboards muaj lub ntsaws uas nkag mus rau lub motherboard rau lub zog khawm. Siv lub ntsuas ntsuas kom paub seb tus pin twg yog hauv av ntawm lub khawm khawm lub zog. Tus pin hauv av yuav nyeem tsis kam thaum koj txuas ib qho kev sojntsuam mus rau PC chassis thiab ib qho rau tus pin. Txuas nruab nrab ceg ntawm NPN transistor rau tus pin hlau koj txiav txim siab tsis yog hauv av hauv cov kauj ruam dhau los, cov tsheb nqaj hlau hauv av mus rau tus xa tawm, thiab tus pin 9 rau tus neeg khaws khoom. Kuv kuj tau txuas 5 lub hwj chim muab hluav taws xob rau lub hwj chim, yog li nws tuaj yeem muaj lub zog tas li los tshuaj xyuas lub teeb liab.

Kauj Ruam 3: Nyeem Cov Ntaub Ntawv

Nyeem Cov Ntaub Ntawv
Nyeem Cov Ntaub Ntawv

Thawj khub lub wireless nyob deb los ntawm nias lub khawm khawm, tuav khawm teeb tsa kom txog thaum lub teeb pom kev tig ntsuab, thiab nias Xfinity. Yog tias koj ua tiav, tus liab coj ntawm XR8 yuav tsum teeb thaum koj nias lub pob ntawm lub chaw taws teeb (tsis suav nrog lub zog, teeb tsa, thiab sib pauv). Txhawm rau pom lub teeb liab ntawm cov ntaub ntawv qhib kev saib xyuas hauv Arduino program lossis qhib qhov tso thiab nyeem cov ntaub ntawv nws tau txais. Kuv qhia koj kom nias thiab tuav lub pob ib zaug thiab sau cov txiaj ntsig hauv lo lus. Koj yuav pom qhov sib tshooj hauv cov lej ntawm cov nyees khawm vim tias cov chaw taws teeb siv XMP raws tu qauv.

Kauj Ruam 4: Sib Koom Txoj Cai

Sib Koom Txoj Cai
Sib Koom Txoj Cai

Yog tias koj tsis tau teeb tsa nab hab sej 2.7 lossis siab dua hauv koj lub khoos phis tawj, tom qab ntawd koj yuav tsum ua li ntawd txhawm rau sim ua tus yuam sij. Tsis tas li ntawd koj yuav xav tau tus lej xov tooj. Cov ntawv hauv qab no tau sau rau Linux raws cov tshuab, tab sis kev hloov kho yog yooj yim. Nco ntsoov tias koj hloov chaw nres nkoj mus rau chaw nres nkoj Arduino nyob. Yog tias koj xav ntxiv cov cai tshiab uas sib haum rau lub pob, tom qab ntawd siv tus qauv no los sau cov cai:

elif kab == put-code-here:

(4 qhov chaw ua ntej kab ntawv tom ntej) p.communicate ('khawm-rau-simulate')

koj tuaj yeem muaj nws nias ntau lub nyees khawm tsuav koj nkag mus 4 qhov chaw ua ntej p.communicate hais kom ua.

Kauj Ruam 5: Teem Python Script kom khiav ntawm Pib

Teeb Python Script los Pib Thaum Pib
Teeb Python Script los Pib Thaum Pib

Hauv Linux ib puag ncig, teeb tsa tsab ntawv kom khiav yog yooj yim. Qhib cov ntawv qhia zaub mov pib, ntaus "pib" thiab nkag mus, nyem rau ntxiv thiab kev cai hais kom ua hauv qhov nco cia, muab cov lus txib lub npe zoo li tej thaj chaw deb, ntaus cov npe rau cov ntawv nab nab koj rub tawm hauv kab lus hais kom ua, thiab nyem ntxiv. Tam sim no cov chaw taws teeb yuav tswj hwm koj lub PC lub sijhawm tom ntej koj khau raj koj lub computer.

Pom zoo: