Cov txheej txheem:

Technology rau Koj Yawg: 13 Kauj Ruam (nrog Duab)
Technology rau Koj Yawg: 13 Kauj Ruam (nrog Duab)

Video: Technology rau Koj Yawg: 13 Kauj Ruam (nrog Duab)

Video: Technology rau Koj Yawg: 13 Kauj Ruam (nrog Duab)
Video: tos koj hauv nruab dab - nuj xeem - nkauj tawm tshiab fullMV 2021 2024, Kaum ib hlis
Anonim
Image
Image

Muaj pes tsawg zaus koj tau mus rau koj niam tais yawm txiv lub tsev los pab nrog "teeb meem thev naus laus zis" uas tau dhau los ua lub xov tooj tsis txuas, lub roj teeb nyob deb lossis tsis tuaj yeem hloov lub hauv paus ntawm lawv lub TV? Kuv paub tias rau kuv, qhov no tshwm sim ntau zaus. Thaum feem ntau ntawm lawv cov teeb meem tuaj yeem daws tau los ntawm kev yooj yim khiav mus rau tom khw rau qee qhov AA tshiab, qee zaum lawv tuaj yeem tau txais txiaj ntsig los ntawm kev daws teeb meem ntau dua.

Piv txwv li, kuv tus hluas nkauj tus yawg tau txais lub TV tshiab thiab peb tau sim qhia nws yuav hloov pauv qhov twg yog li nws tuaj yeem hloov pauv ntawm DVDs thiab TV - tab sis nws tsuas yog tsis tuaj yeem txiav txim siab nws. Nws kuj tseem cuam tshuam nrog qhov muag tsis pom thiab tsis txaus siab xav ua kom nco qab cov txheej txheem nyuaj, nws tsuas yog xav saib nws cov yeeb yam thaum nws xav tau. Tom qab sim piav qhia cov kauj ruam thaum peb mus ntsib zaum kawg tsis muaj kev vam meej ntau, Kuv txiav txim siab tias kuv tsuas yog ua rau nws tus kheej yooj yim ob lub khawm tswj chaw taws teeb. Qhov no yuav tso cai rau nws hloov cov tswv yim nkag los ntawm nws lub TV tsis mob, hloov ntawm nws tus hlub Matlock DVDs thiab Nqe yog Txoj Cai yooj yim.

Kauj ruam 1: Cov ntaub ntawv

  • PhidgetIR
  • PhidgetSBC4 (lossis ib lub tshuab computer tib yam li Raspberry Pi)
  • Soldering Hlau
  • Sab Cutters
  • Hlau Strippers
  • Jumper Hlau
  • USB Cable
  • Phidget Kab
  • Cov ntaub ntawv kaw
  • Lub hauv paus taub hau
  • Kub-ntsws tubing

Kauj ruam 2: Npaj

3D Luam
3D Luam

Txhawm rau tsim cov chaw taws teeb, Kuv xav tau lub peev xwm xa cov neeg siv khoom siv infrared (CIR) cov lus txib rau hauv TV. Kuv txiav txim siab siv PhigetIR rau txoj haujlwm no. PhidgetIR yog USB tswj cov cuab yeej uas muaj peev xwm xa thiab tau txais CIR cov lus txib. Kuv xaiv qhov no rau qee qhov laj thawj:

  • Kuv xav kom ua tiav txoj haujlwm no sai li sai tau thiab muab tso rau siv, yog li qhov kev xav ntawm kev rhuav tshem kuv lub oscilloscope thiab lub rooj noj mov tsis txaus siab. Tsis tas li, yuav ua li cas thiaj li yog tias kuv cov xaim hluav taws xob siv tes yuav tseem ua haujlwm hauv ib xyoos lossis ob xyoos?
  • PhidgetIR muaj peev xwm "kawm" CIR cov lus txib ua rau kev txhim kho yooj yim heev.
  • Koj tuaj yeem siv yuav luag txhua qhov kev hais lus tseem ceeb nrog PhidgetIR. Qhov no txhais tau tias kuv tuaj yeem siv Java thiab ua tiav txhua yam sai sai.
  • Thaum kawg, Kuv ua haujlwm rau Phidgets, yog li kuv xis nyob nrog API, thiab ib txwm muaj cov khoom siv tso tseg ib puag ncig.

Vim tias kuv tau xaiv siv PhidgetIR, Kuv xav tau lub khoos phis tawj kom khiav tawm ntawm. Kuv xav kom txoj haujlwm no yog daim ntawv thov ib leeg, zoo ib yam li tej thaj chaw deb ib txwm, yog li lub desktop lossis lub laptop tawm. Kuv tau xaiv los siv PhidgetSBC4 (ib lub khoos phis tawj siv computer ua haujlwm Debian Linux), vim nws tso cai rau kuv los cuam tshuam nrog ob lub laub khawm yam tsis muaj kho vajtse ntxiv. Lawv tuaj yeem yooj yim txuas ncaj qha rau VINT Hub built-in. Nco tseg: koj kuj tseem tuaj yeem siv Raspberry Pi rau txoj haujlwm no. Thaum kawg, ntxiv rau qhov ua haujlwm tau zoo, kuv xav kom txoj haujlwm no zoo, yog li kuv txiav txim siab tias yuav tsum muaj daim ntawv luam tawm 3D.

Kauj Ruam 3: Luam 3D

3D Luam
3D Luam
3D Luam
3D Luam

Txog qhov haujlwm no, Geomagic tau siv los ua qauv ntawm lub thawv. Muaj cov ntawv 3D cov ntawv muaj rau PhidgetIR thiab PhidgetSBC4 uas yooj yim rau txheej txheem. Qee qhov kev txiav txim siab tau ua nyob rau theem no hais txog qhov loj thiab kev ua haujlwm ntawm lub thawv:

  • PhidgetIR muaj ob lub IR LEDs uas yuav tsum tau taw qhia rau TV txhawm rau xa cov lus txib. Hloov chaw ntawm kev tsim lub thaiv ib ncig ntawm PhidgetIR lub rooj tsavxwm, IR LEDs tuaj yeem ua kom qhuav thiab lo rau hauv lub qhov nyob ntawm ib sab ntawm lub thawv ntawv. PhidgetIR pawg thawj coj tuaj yeem raug tshem tawm ntawm LEDs, siv qhov chaw khoob.
  • VINT Hub txuas ntawm PhidgetSBC4 tuaj yeem khoov mus rau sab saud, uas tseem yuav tso cai nkag mus rau lub khawm sib txuas, thiab tseem yuav tiv thaiv kom muaj qhov thaiv loj dua.

Kuv kuj tau txiav txim siab ntxiv daim ntawv lo rau cov nyees khawm thiab daim ntawv lo qhia qhov kev taw qhia nws yuav tsum ntsej muag kom IR LEDs tau taw qhia kom raug. Kuv tau luam tawm lub thawv ntawv ntawm cov yas ABS dub.

Kauj Ruam 4: Sib dhos - Tshem tawm cov LEDs

Sib dhos - Tshem tawm cov LEDs
Sib dhos - Tshem tawm cov LEDs
Sib dhos - Tshem tawm cov LEDs
Sib dhos - Tshem tawm cov LEDs
Sib dhos - Tshem cov LEDs
Sib dhos - Tshem cov LEDs

IR LEDs thaum kawg yuav tau muab lo rau hauv qhov ntawm ib sab ntawm lub thawv. Qhov no txhais tau tias lawv yuav tsum xub muab pov tseg.

Kauj Ruam 5: Los Ua Ke - Ntxiv Los Ntawm Qhov Headers

Los Ua Ke - Ntxiv Los Ntawm Qhov Headers
Los Ua Ke - Ntxiv Los Ntawm Qhov Headers
Los Ua Ke - Ntxiv Los Ntawm Lub Qhov Taub Hau
Los Ua Ke - Ntxiv Los Ntawm Lub Qhov Taub Hau

Tom ntej no, hla-lub taub hau tau ntxiv qhov twg LEDs siv los ua, uas ua rau lawv yooj yim mus txuas rau siv 4-tus pin jumper hlau. Siv cov raj cua sov kom qis los tiv thaiv kev sib tsoo.

Kauj Ruam 6: Sib dhos - Txuas cov LEDs

Los Ua Ke - Txuas cov LEDs
Los Ua Ke - Txuas cov LEDs
Los Ua Ke - Txuas cov LEDs
Los Ua Ke - Txuas cov LEDs

Kaw cov LEDs rau sab ntawm qhov thaiv.

Kauj Ruam 7: Sib dhos - Txuas nrog PhidgetIR

Sib dhos - Txuas nrog PhidgetIR
Sib dhos - Txuas nrog PhidgetIR
Sib dhos - Txuas nrog PhidgetIR
Sib dhos - Txuas nrog PhidgetIR
Sib dhos - Txuas nrog PhidgetIR
Sib dhos - Txuas nrog PhidgetIR

Txuas PhidgetIR mus rau lub thawv ntawv, thiab txuas cov LEDs.

Kauj Ruam 8: Los Ua Ke - Ntxiv Cov Khawm

Los Ua Ke - Ntxiv Nyees khawm
Los Ua Ke - Ntxiv Nyees khawm
Los Ua Ke - Ntxiv Nyees khawm
Los Ua Ke - Ntxiv Nyees khawm
Los Ua Ke - Ntxiv Nyees khawm
Los Ua Ke - Ntxiv Nyees khawm

Cov nyees khawm yuav tsum tau txuas nrog VINT Hub ntawm PhidgetSBC, yog li kuv txiav Phidget Cable ib nrab thiab siv qhov xaus rau cov nyees khawm. Nco ntsoov tias tsuas yog cov xaim dawb (teeb liab) thiab dub (hauv av) xav tau.

Kauj Ruam 9: Sib dhos - Muab Txhua Yam Ua Ke

Sib dhos - Muab Txhua Yam Ua Ke
Sib dhos - Muab Txhua Yam Ua Ke
Los Ua Ke - Muab Txhua Yam Ua Ke
Los Ua Ke - Muab Txhua Yam Ua Ke

Qee qhov kev tswj hwm cable xav tau kom tau txais txhua yam ua ke, txawm li cas los xij, lub thawv ntawv ua haujlwm tau zoo.

Kauj ruam 10: Software - Code

Tsuas muaj ib daim ntawv Java uas xav tau rau txoj haujlwm no uas koj tuaj yeem pom ntawm no. Txoj haujlwm siv ib qho khoom PhidgetIR, thiab ob qho khoom siv DigitalInput. Koj tuaj yeem tsim cov khoom zoo li no:

PhidgetIR ir = tshiab PhidgetIR ();

DigitalInput tvButton = tshiab DigitalInput (); DigitalInput otherButton = tshiab DigitalInput ();

Cov khoom siv Digital tau teeb tsa rau lub cev khawm ntawm VINT Hub. Txuas, tshem tawm, ua yuam kev, thiab xwm txheej hloov pauv hauv lub xeev tseem tau sau npe rau:

tv.setIsHubPortDevice (muaj tseeb);

tvButton.setHubPort (4); tvButton.addAttachListener (onAttachListener); tvButton.addDetachListener (onDetachListener); tvButton.addErrorListener (onErrorListener); tvButton.addStateChangeListener (onStateChangeListener); tvButton.open (); otherButton.setIsHubPortDevice (muaj tseeb); otherButton.setHubPort (5); otherButton.addAttachListener (onAttachListener); otherButton.addDetachListener (onDetachListener); otherButton.addErrorListener (onErrorListener); otherButton.addStateChangeListener (onStateChangeListener); otherButton.open ();

Lub xeev cov neeg mloog hloov pauv hais los saum toj no zoo li no:

privatestatic DigitalInputStateChangeListener onStateChangeListener = tshiab DigitalInputStateChangeListener () {@OverridepublicvoidonStateChange (DigitalInputStateChangeEvent disce) {

DigitalInput ch = (DigitalInput) disce.getSource (); sim {yog (ch.getHubPort () == 4 && disce.getState () == muaj tseeb) {tvButtonActivated = tseeb;} yog (ch.getHubPort () == 5 && disce.getState () == muaj tseeb) {otherButtonActivated = muaj tseeb;}} ntes (PhidgetException ex) {System.out.println ("Yuam kev:"+ ex.getDescription ());}}};

Thaum lub pob tau qhib, qhov xwm txheej yuav ua thiab teeb tus chij. Cov chij no yuav tau hais txog thiab rov pib dua hauv lub voj loj. Lub voj tseem ceeb tsuas yog tos rau kev hloov pauv hauv lub xeev khawm, thiab tom qab ntawd xa IR cov lus txib siv cov haujlwm xa tawm uas muaj los ntawm PhidgetIR API.

thaum (muaj tseeb) {yog (tvButtonActivated) {

tvButtonActivated = cuav; Log.log (LogLevel. INFO, "QHOV CHAW SIV - TV"); ir.transmit (sourceButtonString, codeInfo); Xov.sleep (500); ir.transmit (rightButtonString, codeInfo); Xov.sleep (500); ir.transmit (enterButtonString, codeInfo);} yog (otherButtonActivated) {otherButtonActivated = cuav; Log.log (LogLevel. INFO, "QHOV CHAW NYOB - DVD"); ir.transmit (sourceButtonString, codeInfo); Xov.sleep (500); ir.transmit (leftButtonString, codeInfo); Xov.sleep (500); ir.transmit (enterButtonString, codeInfo);} Xov.sleep (250);}

Kauj ruam 11: Software - CIR Commands

Software - CIR Commands
Software - CIR Commands

Nov yog qhov piv txwv ntawm yuav tsim cov lus txib (ntim ntim li cas hauv qhov no):

// IR Code

IRCodeInfo sourceButtonCI = tshiab IRCodeInfo (); Txoj hlua volumeUp = "77e1d0f0"; // Teeb tsa lub pob qhov chaw sourceButtonCI.bitCount = 32; sourceButtonCI.encoding = IRCodeEncoding. SPACE; sourceButtonCI.gap = 108921; sourceButtonCI.trail = 549; sourceButtonCI.zero = newint [2]; sourceButtonCI.zero [0] = 549; sourceButtonCI.zero [1] = 627; sourceButtonCI.one = newint [2]; sourceButtonCI.one [0] = 549; sourceButtonCI.one [1] = 1755; sourceButtonCI.header = newint [2]; sourceButtonCI.header [0] = 9084; sourceButtonCI.header [1] = 4600; sourceButtonCI.repeat = newint [3]; sourceButtonCI.repeat [0] = 9084; sourceButtonCI.repeat [1] = 2308; sourceButtonCI.repeat [2] = 549; sourceButtonCI.length = IRCodeLength. CONSTANT;

Txhawm rau kom tau txais cov ntaub ntawv rau cov lus txib no, kuv yooj yim siv PhidgetIR piv txwv uas los nrog Phidget cov tsev qiv ntawv. Tom qab taw qhia cov chaw taws teeb mus rau PhidgetIR thiab tuav lub ntim ntim khawm, IR "kawm" cov cai, thiab nthuav cov piv txwv. Cov ntaub ntawv no tuaj yeem yooj yim theej rau hauv txoj cai.

Kauj ruam 12: Khiav qhov program

Cov ntaub ntawv Java tuaj yeem sau thiab sau ua ke ntawm lub khoos phis tawj sab nraud. Muab PhidgetRemote.java thiab phidget22.jar nyob rau hauv tib lub nplaub tshev thiab ua raws li cov lus txib hauv qab no:

Windowsjavac -classpath.; Phidget22.jar PhidgetRemote.java

macOS/Linuxjavac -classpath.: phidget22.jar PhidgetRemote.java

Tom qab suav ua ke, luam cov ntawv tsim tawm hauv chav kawm rau PhidgetSBC4, thiab teeb tsa nws kom khiav ntawm khau raj.

Kauj Ruam 13: Qhov tshwm sim

Thaum kuv muab lub chaw taws teeb rau kuv tus hluas nkauj tus yawg thiab qhia nws siv nws li cas, nws xav tsis thoob tias nws yooj yim npaum li cas. Txheeb tawm cov vis dis aus kom pom nws hauv kev nqis tes ua!

Kev Sib Tw Tswj Chaw Taws Teeb 2017
Kev Sib Tw Tswj Chaw Taws Teeb 2017
Kev Sib Tw Tswj Chaw Taws Teeb 2017
Kev Sib Tw Tswj Chaw Taws Teeb 2017

Qhov khoom plig thib peb hauv Kev Tswj Chaw Taws Teeb 2017

Pom zoo: