Cov txheej txheem:

Pi Cap Capong Project Tutorial: 14 Kauj Ruam (nrog Duab)
Pi Cap Capong Project Tutorial: 14 Kauj Ruam (nrog Duab)

Video: Pi Cap Capong Project Tutorial: 14 Kauj Ruam (nrog Duab)

Video: Pi Cap Capong Project Tutorial: 14 Kauj Ruam (nrog Duab)
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Hlis ntuj nqeg
Anonim
Pi Cap Capong Project Tutorial
Pi Cap Capong Project Tutorial

Pong yog ib qho ntawm peb cov vis dis aus nyiam tshaj plaws, thiab hauv kev sib tham tsis ntev los no, peb muaj hmoo kom muaj Paul Tanner, Tina Aspiala thiab Ross Atkin tig Pong rau hauv "Capong" (muaj peev xwm + Pong!) Los ntawm kev tawg nws tawm ntawm qhov screen thiab rau hauv lawv tes. Lawv siv Pi Cap thiab Raspberry Pi los ua daim ntawv qhia Pong paddles mus rau txoj haujlwm ntawm lawv txhais tes thiab tsim qhov yooj yim, nyuaj thiab ua si tiag tiag.

Pi Cap yog Bare Conductive qhov khoom tshiab tshaj plaws. Raspberry Pi ntxiv-ntxiv, nws tso cai rau koj ntxiv qhov muaj peev xwm kov tau, kev nyob ze thiab hnov suab zoo rau koj li haujlwm Raspberry Pi. Nws ua haujlwm nrog Raspberry Pi A+, B+, Zero thiab tom qab (ib qho Raspberry Pi nrog 40 tus pin GPIO txuas). Nrog kev nkag siab zoo ntawm Kov Pawg, thiab suav lub zog ntawm Raspberry Pi, Pi Cap muaj qhov cuab yeej zoo rau kev hloov pauv cov ntaub ntawv analog rau hauv cov txiaj ntsig digital.

Peb yuav tso nws mus rau Paul kom coj koj mus dhau "Capong" hauv qab no:

Capacitive Pong yog kev txhais lus ntawm qhov kev ua si tshuaj ntsuam ib txwm muaj. Hloov chaw ntawm kev siv nas lossis xub tuav nws siv lub peev xwm ntsuas. Qhov kev ua si khiav ntawm Pi Zero nrog Pi Cap ntxiv-rau thiab Ethernet adapter.

Qhov no muab 12 lub tswv yim nkag mus, uas 4 siv. Lawv tau teeb tsa ntawm laser-txiav sawv kom txhua tus neeg ua si txav nws txhais tes ntawm ob khub ntawm lub ntsuas.

Qhov kev ua si yog ua los ntawm SimplePong, muaj nyob rau ntawm openprocessing.org, thiab tso tawm hauv Creative Commons. Qhov no tau hloov kho los siv cov tswv yim los ntawm Pi Cap sensors (hloov ntawm nas) thiab hloov mus rau 2 tus neeg ua haujlwm ua haujlwm.

Thawj qhov ua haujlwm ntawm lub khoos phis tawj hauv Kev Ua Haujlwm thiab siv nws cov tswv yim dhau Qhib Suab Tswj (OSC) raws tu qauv los ntawm Pi Zero. Ntawm Pi Zero, peb siv cov software tso tawm muab nrog Pi Cap - ib qho ntawm cov qauv tsim tawm OSC kwj.

Qhov tsis tu ncua tau txais los ntawm kev sim, sib piv qhov ntau ntawm cov txiaj ntsig los ntawm Pi Cap nrog qhov siab ntawm lub qhov rais ua si. Nws yuav yog qhov zoo los tso txhua yam rau ntawm Pi, peb yuav tsum tau ntxuav cov cai, sau daim ntawv tsis tu ncua thiab lwm yam. tab sis qhov ntawd yog lwm hnub.

Nrhiav paub ntau ntxiv txog Pi Cap cov yam ntxwv thiab tau txais koj li niaj hnub no los ntawm peb lub khw online. Yog tias koj xav sim thiab ua koj tus kheej Capong, ua raws cov lus qhia hauv qab no. Txaus siab rau!

@paul_tanner 25 Lub Xya Hli 2016 Sawv tsim thiab kev tshoov siab los ntawm @rossatkin thiab @spongefile

Kauj ruam 1: Yees duab

Image
Image

Hauv cov vis dis aus luv luv no, Ross piav qhia nws pab neeg txoj haujlwm thiab lawv mus li cas los ntawm kev tsim qauv los ua qhov kawg ua haujlwm ntawm lawv ob qhov kev ua si siv Pi Zero thiab Pi Cap.

Kauj Ruam 2: Yuav Teeb Li Cas

Piv txwv Code
Piv txwv Code

Khiav dhau qhov 'Teeb tsa koj Pi Cap ntawm Raspberry Pi Zero' qhia ntawm no, thiab tsis txhob plam ib qib twg. (Koj yuav tsum paub tus IP ntawm Pi kom nkag mus rau nws.)

Kauj Ruam 3: Piv Txwv

Khiav los ntawm Pi Cap intro kom pom cov qauv piv txwv, tshwj xeeb yog ib qho uas ntws cov ntaub ntawv sensor ntawm OSC rau koj lub laptop qhov rai qhov rai. Pom DIFF cov ntaub ntawv - qhov ntawd yog qhov peb yuav siv.

Kauj ruam 4: Ua

Ua
Ua

Rub tawm thiab teeb tsa Kev Ua Haujlwm yog tias tseem tsis tau muaj ntawm koj lub laptop. Unzip thiab nruab qhov chaws mpr121_pong hauv Kev ua daim duab kos, feem ntau /Cov Ntaub Ntawv /Ua Haujlwm. Qhib cov duab kos hauv kev ua thiab pib nws khiav. Tsis muaj dab tsi tshwm sim hauv lub qhov rai ua si kom txog thaum koj ua tiav cov hauv qab no.

Kauj ruam 5: OSC

OSC
OSC

Txhawm rau khiav OSC demo standalone, mus rau koj li PiCapExamples nplaub tshev ntawm Pi thiab cd rau cpp/picap-datastream-osc-cpp. Siv./run kom pom Pi Cap datastream.

Tshawb nrhiav tus IP ntawm koj lub khoos phis tawj siv./run –host [IP chaw nyob ntawm lub khoos phis tawj] kom ntws mus rau Kev Ua Haujlwm.

Tam sim no Pong yuav tsum tau khiav. Nyem rau lub laptop nas kom pib ua si. Qhov kev ua si tiav thaum ib tus neeg ncaws pob plam pob. Nyem rau lub laptop nas kom pib lwm qhov kev ua si.

Kauj Ruam 6: Acrylic Stand

Acrylic Sawv
Acrylic Sawv

Yog tias koj xav tsim cov acrylic sawv pom ntawm daim vis dis aus, koj tuaj yeem rub cov Illustrator cov ntaub ntawv hauv qab no thiab ua raws cov lus qhia qhia, ua siab zoo ntawm @rossatkin. Koj yuav xav tau lub tshuab txiav laser txiav cov no, lossis koj tuaj yeem ua nws tawm ntawm lub rooj ua npuas ncauj.

Rub tawm Red Template

Download Dawb Qauv

Kauj Ruam 7: Sib dhos

Los ua ke
Los ua ke

Txhawm rau ua ke koj lub rooj muag zaub, lo ib qho ntawm I-puab daim rau cov duab plaub dawb uas tsis muaj qhov nyob hauv.

Ua ntej koj muab tshuaj txhuam rau hauv ob daim duab plaub liab, nco ntsoov ntxig ob daim khej kab rau hauv tus qauv raws li pom hauv daim duab, yuav tsum muaj lub qhov rau cov xaim hluav taws xob tawm thaum koj muab ob sab. Qhov no yuav ua kom ntseeg tau tias cov xov hlau tau zais hauv koj lub rooj muag khoom tab sis tseem siv tau.

Kaw ob daim duab plaub liab rau cov qauv dawb.

Kauj ruam 8: Kua nplaum

Kua nplaum
Kua nplaum
Kua nplaum
Kua nplaum

Siv txhuam me me, txhuam txhua pob qij txha ntawm qhov muag nrog cov kua nplaum acrylic, cov nplaum no yuav yaj cov yas ua ke. Ua tib zoo nrog cov xim liab liab, nws tuaj yeem yaj thiab tso qee yam xim.

Koj yuav tsum tseem muaj ib daim acrylic seem, daim duab plaub dawb nrog ob lub qhov. Tsis txhob lo lo rau daim no.

Kauj Ruam 9: Khaub Ncaws Khaub Ncaws

Khej Dais
Khej Dais
Khej Dais
Khej Dais
Khej Dais
Khej Dais

Sawv ntsug koj lub Capong kom ncaj (yog li daim dawb uas tsis muaj qhov kov lub rooj). Nco ntsoov tias koj muaj cov xaim txaus kom koj cov khej kauv kab tawm rau saum (koj xav tau tsawg kawg 3in ntawm croc clip pom raws li qhia hauv daim duab).

Tam sim no, tso qee qhov ntev ntawm cov xaim tawm hauv qab ntawm qhov sawv, thiab txiav thiab hle cov xaim. Koj yuav tsum muaj kwv yees li 1.5 cm ntawm tooj liab hlau nthuav tawm. Koj yuav siv qhov no los txuas cov xaim tooj liab rau lub ntsuas cua.

Kauj Ruam 10: Xim Koj Cov Duab

Xim koj cov Sensors
Xim koj cov Sensors
Xim koj cov Sensors
Xim koj cov Sensors

Txiav tawm ob daim duab los plaub fab thiab ob lub duab plaub. Cov no yuav mus rau koj lub rooj muag khoom yog li koj tuaj yeem ntsuas qhov loj ntawm sab hauv sab hauv rau qhov loj me.

Yog tias koj siv Xim Xim, koj tuaj yeem pleev xim ncaj qha rau cov xwm txheej no. Thaum qhuav, siv qee daim kab xev ob npaug, koj yuav lo rau lub ntsej muag ntsuas lub ntsej muag tawm tsam cov acrylic. Tab sis ua ntej, koj yuav tsum tau txias cov xim pleev xim!

Kauj Ruam 11: Txias Tus Kheej

Cov Tub Rog Txias
Cov Tub Rog Txias
Cov Tub Rog Txias
Cov Tub Rog Txias
Cov Tub Rog Txias
Cov Tub Rog Txias

Siv koj lub raj Hluav Taws Xob Hluav Taws Xob, nyem tawm cov xim zoo rau ntawm cov tooj liab. Koj yuav tsum xyuas kom cov hlau nyob hauv qhov chaw kom nws tsis txav mus los (koj tuaj yeem siv daim kab xev ob tog).

Lub ntsuas ntsuas tiav yuav tsum zoo li daim duab thib peb hauv Kauj Ruam 11. Thaum koj ua tiav koj yuav tsum muaj plaub lub ntsuas, ob lub xwmfab, ob lub duab plaub, txuas rau txhua sab ntawm Capong sawv ntsug.

Kauj Ruam 12: Aluminium Ntawv Nyiaj Sensor

Aluminium Ntawv Nyiaj Sensor
Aluminium Ntawv Nyiaj Sensor
Aluminium Ntawv Nyiaj Sensor
Aluminium Ntawv Nyiaj Sensor
Aluminium Ntawv Nyiaj Sensor
Aluminium Ntawv Nyiaj Sensor

Yog tias koj tsis muaj Xim Xim koj tuaj yeem ua rau koj lub ntsuas cua siv aluminium ntawv ci. Tsuas yog ua raws cov theem ib yam li tau hais los saum toj no, tab sis qhaub cij xaim xaim ntawm cov ntawv txhuas thiab daim duab los raws li pom hauv cov duab ntawm sab xis.

Kauj Ruam 13: Txuas rau Sawv

Txuas rau Sawv!
Txuas rau Sawv!
Txuas rau Sawv!
Txuas rau Sawv!

Tam sim no koj tuaj yeem khov kho koj lub ntsuas pa mus rau qhov sawv thiab tawm koj Pi Cap thiab Pi Zero!

Kauj Ruam 14: Txuas nrog Pi Cap

Txuas rau Pi Cap
Txuas rau Pi Cap
Txuas rau Pi Cap
Txuas rau Pi Cap

Nqa cov khej cuav uas tau nthuav tawm los ntawm sab saum toj ntawm Capong sawv ntsug, thiab txuas lawv rau koj Pi Cap cov hluav taws xob. Xyuas kom tseeb tias koj txuas rau cov electrodes uas raug - qhov uas koj tau npaj rau kev ua haujlwm. Tam sim no koj tuaj yeem txuas koj Pi Zero, xa cov cai, thiab ua si! Zoo li txoj haujlwm no? Xav ua koj tus kheej? Nrhiav paub ntau ntxiv txog Pi Cap cov yam ntxwv thiab tau txais koj li niaj hnub no los ntawm peb lub khw online.

Pom zoo: