Cov txheej txheem:

Hack Koj Xus Nrog Phidgets: 9 Kauj Ruam (nrog Duab)
Hack Koj Xus Nrog Phidgets: 9 Kauj Ruam (nrog Duab)

Video: Hack Koj Xus Nrog Phidgets: 9 Kauj Ruam (nrog Duab)

Video: Hack Koj Xus Nrog Phidgets: 9 Kauj Ruam (nrog Duab)
Video: Tik Tok || Tseem Nco Koj Thiab Kuv P15 2024, Kaum ib hlis
Anonim

Txoj haujlwm no yuav qhia koj yuav ua li cas koj tuaj yeem "hack" koj cov khoom siv Halloween thiab ua kom lawv coj raws nraim qhov koj xav tau!

Kev kho kom zoo nkauj Xus peb tab tom ua haujlwm nrog muaj qhov ua haujlwm tsis zoo hauv qab no:

  • Qhib los ntawm kev hloov pauv (pom hauv video)
  • Qhib los ntawm lub suab nrov

Peb lub hom phiaj rau txoj haujlwm no yog ua kom nws txav mus los ua haujlwm!

Kauj Ruam 1: Xav Tau Txuj Ci

Rau txoj haujlwm no, koj yuav xav tau cov cuab yeej hauv qab no:

  • cam khwb cia hlau
  • cov hlua hlau

Nws tseem yuav pab tau yog tias koj muaj qee qhov kev paub txog kev ua haujlwm yooj yim. Peb tau sau qhov program uas tswj kev kho kom zoo nkauj hauv C.

Kauj Ruam 2: Txheeb Tawm Yog tias Koj Xus Kho Kom Zoo Nkauj Yog "Hackable"

Xam Tawm Yog Koj Xus Kho Kom Zoo Nkauj Yog
Xam Tawm Yog Koj Xus Kho Kom Zoo Nkauj Yog

Thawj kauj ruam yog xam tawm yog tias koj tuaj yeem hloov kho koj lub Xus kho kom zoo nkauj. Feem ntau, kev kho kom zoo nkauj yuav muaj hom ua qauv qhia uas yuav qhib lub tshuab hluav taws xob ntawm kev kho kom zoo nkauj nrog khawm yooj yim lossis hloov pauv. Yog tias qhov no yog qhov koj muaj hmoo. Koj tuaj yeem yooj yim hloov khawm nrog kev xa rov qab txhawm rau txhawm rau tswj hwm lub kaw lus.

Kauj Ruam 3: Cheeb Tsam/Cov Khoom Kho Vajtse

Cov Cheeb Tsam/Cov Khoom Kho Khoom Siv
Cov Cheeb Tsam/Cov Khoom Kho Khoom Siv

Nov yog qhov peb tau siv:

  • Phidget SBC4
  • DST1200 - Sonar Phidget
  • REL2002 - Teeb liab Relay Phidget
  • Waterproof thaiv
  • Phidget Kab

Kauj ruam 4: Txheej txheem cej luam

Txheej txheem cej luam
Txheej txheem cej luam

Qhov project no yuav muaj cov txheej txheem hauv qab no:

  • PhidgetSBC4 yuav ua peb txoj haujlwm program (sau hauv C). Nws yuav txuas nrog DST1200 sonar sensor thiab REL2002 teeb liab xa tawm los ntawm kev ua hauv VINT Hub.
  • Lub sonar sensor yuav raug siv los txheeb xyuas cov khoom.
  • Kev xa tawm yuav txuas nrog lub xov tooj hluav taws xob ntawm kev kho kom zoo nkauj, thiab yuav siv los qhib qhov kho kom zoo nkauj raws li kev nyeem los ntawm sonar sensor.

Kauj ruam 5: Txiav khawm Txuas

Txiav khawm Kev Sib Txuas
Txiav khawm Kev Sib Txuas

Txhawm rau ntxiv peb qhov txuas, peb yuav tsum tshem lub pob. Cias txiav cov xov hlau ze rau ntawm lub pob, thiab tom qab ntawd tshem tawm qee qhov rwb thaiv tsev.

Kauj Ruam 6: Ntxiv Relay

Ntxiv Relay
Ntxiv Relay

Nqa cov xov hlau los ntawm khawm thiab txuas lawv mus rau qhov txuas.

Txuas ib lub xaim mus rau Lub davhlau ya nyob twg thiab ib qho mus rau Qhov Qhib Qhib.

Kauj Ruam 7: Mount DST1200 Sonar Sensor

Mount DST1200 Sonar Sensor
Mount DST1200 Sonar Sensor
Mount DST1200 Sonar Sensor
Mount DST1200 Sonar Sensor

Qhov twg koj tso lub sonar sensor yuav nyob ntawm koj daim ntawv thov. Txoj haujlwm no yuav raug teeb tsa hauv lub tsev haunted sab nraum qhov pom kev yuav qis, yog li muaj lub sonar sensor zaum ncaj qha rau saum yuav tsis muaj teeb meem. Xwb, koj tuaj yeem nce lub sonar saum lub qhov rooj, lossis taw tes los ntawm hauv av yog tias koj xav zais nws.

Peb tau siv qee cov kua nplaum los txhawm rau ntsuas lub suab sonar. Daim kab xev ob tog kuj tseem yuav ua haujlwm zoo!

Kauj Ruam 8: Txiav txim siab yog tias Koj Xav Tau Daim Ntawv Cuam Tshuam

Txiav txim siab yog koj xav tau daim ntawv kaw
Txiav txim siab yog koj xav tau daim ntawv kaw

Txoj haujlwm no yuav nyob sab nraud, yog li muaj kev tiv thaiv hluav taws xob yog qhov tseem ceeb.

SBC yuav zaum sab hauv lub thawv thaiv dej uas tsis muaj qhov txuas. Peb txuas qhov txuas txuas mus rau qhov kho kom zoo nkauj los ntawm kev siv lub xov hlau, thiab peb siv 350cm ntev Phidget Cable los txuas SBC rau lub ntsuas hluav taws xob.

Kauj Ruam 9: Sau Txoj Cai

Txhua txoj cai rau txoj haujlwm no twb tau sau thiab suav nrog hauv cov ntaub ntawv halloween.c, yog li yog tias koj xav siv nws, txhua yam koj yuav tau ua yog hloov kho ob peb yam (tus lej lej, sijhawm, thiab lwm yam) thiab suav nws..

Yog xav paub ntau ntxiv txog yuav ua li cas sau C cov haujlwm hauv SBC, txheeb xyuas cov kev txuas no:

  • Txhim kho pob khoom rau kev txhim kho
  • Ua ke C cov kev pab cuam ntawm Linux

Nov yog qhov kev tshuaj xyuas sai ntawm cov cai:

  • Tsim DistanceSensor thiab DigitalOutput khoom.
  • Chaw Nyob Phidgets. Saib daim vis dis aus no kom paub ntxiv.
  • Sau npe yuav txuas & tshem tawm cov xwm txheej rau sonar thiab xa tawm.

    Hauv sonar txuas qhov xwm txheej, teeb tsa cov ntaub ntawv luv rau 100ms (qhov tsawg kawg ntawm cov ntaub ntawv luv)

  • Sau npe yuav mus rau qhov hloov pauv cov xwm txheej rau sonar.

    Hauv cov xwm txheej hloov pauv nyob deb, saib yog tias cov khoom nyob ze dua 1 meter, yog tias nws yog, teeb tsa objectDetected variable mus rau 1

  • Hauv lub voj, kos yog tias tau kuaj pom cov khoom. Yog tias yog, tig rov qhib dua thiab tom qab ntawd kaw (qhov no yuav qhib qhov kho kom zoo nkauj). Tos plaub vib nas this, thiab tom qab ntawd deactivate kho kom zoo nkauj.

Pom zoo: