Cov txheej txheem:

Pumpktris - Tetris Pumpkin: 10 Kauj Ruam (nrog Duab)
Pumpktris - Tetris Pumpkin: 10 Kauj Ruam (nrog Duab)

Video: Pumpktris - Tetris Pumpkin: 10 Kauj Ruam (nrog Duab)

Video: Pumpktris - Tetris Pumpkin: 10 Kauj Ruam (nrog Duab)
Video: Только стакан этого сока ... Обратное забивание артерий и снижение высокого кровяного давления 2024, Hlis ntuj nqeg
Anonim
Pumpktris - Tetris Pumpkin
Pumpktris - Tetris Pumpkin

Leej twg xav tau lub ntsej muag luag ntxhi thiab taws tswm ciab thaum koj tuaj yeem muaj taub dag sib cuam tshuam rau Xus no? Ua si qhov koj nyiam tshaj plaws-kev sib tw ua si ntawm 8x16 daim phiaj txua rau hauv lub ntsej muag ntawm lub paj taub, teeb los ntawm LEDs thiab siv lub qia ua tus tswj. Qhov no yog qhov haujlwm ua haujlwm nruab nrab thiab xav tau kev paub ua haujlwm thiab ua haujlwm hauv Arduino ib puag ncig. Koj yuav tau ua haujlwm nrog cov teeb meem organic thiab txhua yam nws muaj nws tus yam ntxwv, yog li kev ntsuas yuav xav tau hloov kho kom haum cov taub dag uas koj siv.

Kauj Ruam 1: Cov Ntaub Ntawv Xav Tau

Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau

Txhawm rau tsim koj tus kheej Pumpktris koj yuav xav tau cov hauv qab no: Cheebtsam

  • 128 5mm amber LEDs (Kuv siv cov no los ntawm Mouser) Yuav qee qhov ntxiv los npog qhov yuam kev lossis kev sim. Kuv tau 140. Amber ze tshaj plaws zoo li lub nplaim taws uas yuav nyob hauv ib txwm tso rau hauv-lub-teeb, tab sis koj muaj kev ywj pheej siv cov xim uas koj nyiam.
  • Arduino microcontroller
  • 1/16 "Thaum tshav kub kub ntsws tubing (11 ko taw, lossis 256 1/2" ntev daim)
  • Arcade joystick nrog tus kov tshem tau (qhov no los ntawm SparkFun ua haujlwm zoo rau kuv)
  • 4 #6 nylon drywall anchors Qhov no tsis yog yam nrog toggles, tab sis yam uas zoo li cov ntsia hlau nrog cov xov sib sib zog nqus
  • 4 ib nrab-nti ntev ntsia hlau ntawm qhov loj me thiab yam uas tuaj nrog cov phab ntsa ntub dej thauj tog rau nkoj. Cov uas tuaj nrog cov thauj tog rau nkoj yuav ntev heev.
  • 6mm x 50mm ntsia liaj qhov rooj (lossis qhov loj me raws li qhov sib dhos rau koj li joystick tuav)
  • 6mm txiv ntoo sib txuas (lossis qhov loj me me xav tau kom haum rau cov ntsia liaj qhov rooj saum toj no) Cov txiv ntoo sib txuas zoo li cov txiv ntoo ib txwm, tab sis ntev txog ib nti ntev thiab siv los koom nrog ob lub ntsia liaj qhov rooj lossis cov hlua xov.

Thiab kawg tab sis tsis tsawg, koj yuav xav tau 1 taub taub. Koj tsuas xav tau ib qho, tab sis kuv pom zoo ob qho kom koj tau txais ib qho uas koj tuaj yeem siv los xyaum xyaum thiab txiav. Koj lub teeb ci LED yuav npog thaj tsam kwv yees li 4 "dav los ntawm 8" siab, yog li koj xav tau taub taub nrog thaj chaw uas loj npaum li tiaj tus thiab tiaj li ua tau yog li koj lub matrix tsis qhwv nyob ib puag ncig. Koj tuaj yeem siv taub dag ua npuas ncauj, tab sis qhov twg yog qhov khawv koob hauv qhov ntawd? Kuv tsis tuaj yeem tham nrog cov txheej txheem carving xav tau ntawm lub taub dag ua npuas ncauj. Cov cuab yeej thiab khoom siv tau

  • Soldering hlau
  • Solder
  • Hlau txiav
  • Cov hlua hlau
  • Laum fais fab
  • Hacksaw
  • X-Acto riam
  • 13/64 "laum ntsis
  • 1-1/8 "laum ntsis (Kuv siv Forstner ntsis, tab sis me ntsis spade yuav ua haujlwm ib yam nkaus)
  • 1/4 "ua npuas ncauj core board

Kauj Ruam 2: Tsim LED Matrix

Tsim ib qho LED Matrix
Tsim ib qho LED Matrix
Tsim ib qho LED Matrix
Tsim ib qho LED Matrix
Tsim ib qho LED Matrix
Tsim ib qho LED Matrix

Txhua tus lej yog tsim los ntawm 64 LEDs thiab 128 daim hlau. Nws yog qhov yooj yim tshaj plaws los txiav thiab hle tag nrho cov xov hlau rau txhua tus lej ua ntej. Txiav 112 rau 2.5 "daim thiab hle 1/4" ntawm txhua qhov kawg. Txiav qhov seem 16 mus rau 12 "daim thiab hle ob qho kawg. Qhov sib xws ntau dua uas koj tuaj yeem tau txais koj cov xov hlau ntev, nws yooj yim dua los tsim thiab teeb tsa.

Koj yuav pib los ntawm kev tsim kaum rau yim-ntu ntu daisy-saw ntawm cov xov hlau-txhua nrog 7 luv thiab 1 xaim ntev. Qhib txhua qhov kawg ua ke nrog daim tom ntej thiab cov laug. Txhawm rau txuas cov xov hlau mus rau LEDs koj yuav xav tau jig los tuav cov LEDS. Kos daim kab xev 8x8 nrog ib nrab ntiv tes nrug ntawm ib qho ntawm 1/4 "-thim ua npuas ncauj-core board, tom qab ntawd siv tus awl txhawm rau txhawm rau lub qhov me me hauv txoj kab uas hla me dua li LED ntawm txhua qhov kev sib tshuam. Koj yuav muaj 64 qhov thaum Koj ua tiav lawm. Hauv kab saum toj kawg nkaus ntawm qhov ntxig 8 LEDs. Lub hauv paus ua npuas ncauj yuav nthuav kom haum rau cov LEDs thiab yuav tuav lawv nruj. Ua kom cov LEDs kom ntev dua txhais ceg-anode lead- yog tig mus rau koj ntawm txhua tus. Txheeb ob zaug, vim tias yog koj ua txhaum qhov matrix yuav tsis ua haujlwm. Kaw txhua qhov anode ua rau kwv yees li 1/4 "ntev, thiab txhuam nws nrog cov laug kom nws yooj yim dua txuas cov xov hlau. Txiav 8 daim ntawm cov cua sov-ntsws tubing rau hauv 1/2 "ntu. Xaub ib daim ntawm tubing hla thawj txoj hlua txuas, thawb nws rov qab kom nws tsis cuam tshuam los ntawm tshav kub ntawm cov laug, tom qab ntawd txuas cov hlau txuas mus rau LED anode. Xaub lub tubing hla qhov kev sib txuas thaum nws txias lawm. Txuas ntxiv mus rau LED tom ntej, rov ua dua xya zaug ntxiv cov txheej txheem ntawm zawv zawg ntawm ib qho ntawm cov tubing, sib txuas qhov txuas, tom qab ntawd txo cov tubing hla qhov sib koom. Thaum koj tau txais ib qho teeb ntawm yim LEDs txhua tus txuas nrog ib leeg, tshem tawm lawv los ntawm jig thiab rov ua dua rau xya kab ntxiv, ua kom ntseeg tau tias ua kom txhua qhov sib txuas mus rau cov hlau lead anode ntawm txhua LED. txij li koj tsuas yog ua haujlwm ib leeg xwb. Tom qab tag nrho yim kab tau raug muag, nws yog lub sijhawm los koom nrog cov kab thiab ua cov lej. Ntxig tag nrho cov hlua LED rau hauv jig koj tau ua. Khaws cov xov hlau ntev tib yam. sab ntawm txhua txoj hlua. Txiav thiab tin cov cathode txhuas ntawm txhua LED hauv thawj col umn, ib yam li koj tau tsim txoj hlua. Siv lwm txoj hlua hlau thiab rov ua cov txheej txheem ntawm kev txuas nws mus rau LEDs, tsuas yog lub sijhawm no koj txuas nws ntawm 90 degrees mus rau thawj txheej ntawm cov xov hlau uas koj tau ua. Khaws cov xaim ntev nyob ntawm ib sab ntawm lub matrix. Raws li koj ua tiav txhua kab, tshem nws los ntawm ua npuas ncauj-tub ntxhais jig thiab quav nws tawm ntawm txoj kev los muab kev nkag mus rau kab ntawv tom ntej. Thaum koj ua tiav txhua yam koj yuav muaj 64 LEDs koom ua 8 kab thiab 8 kab. Hmoov tsis zoo, koj yuav tsum rov ua cov txheej txheem dua rau qhov thib ob. Yog tias koj xav tau so, hla mus rau theem 3, 4, thiab 5 los ua haujlwm ntawm cov cai, tom qab ntawd rov qab los rau qhov no.

Kauj Ruam 3: Tswj cov LEDs

Tswj cov LEDs
Tswj cov LEDs
Tswj cov LEDs
Tswj cov LEDs
Tswj cov LEDs
Tswj cov LEDs
Tswj cov LEDs
Tswj cov LEDs

LED matrices koj tau ua yuav raug tswj los ntawm ob lub Mini 8x8 LED Matrix Backpacks los ntawm Adafruit. Txhua tus tswj hwm tso cai rau koj tsav 64 LEDs nrog tsuas yog ob lub xov hlau los ntawm Arduino, thiab koj tuaj yeem txuas ntau tus tswj hwm ua ke ntawm ob lub xov hlau qub. Ua raws cov lus qhia uas tuaj nrog LED Matrix Backpack rau qhov muag ntawm 4-tus lej fais fab/cov ntaub ntawv/moos lub taub hau. Tom qab ntawd, tsis txhob siv lub tshuab ziab khaub ncaws ntawm LED matrix uas los nrog nws, muab ob kab ntawm tus poj niam lub taub hau rau lub hnab ev ntawv. Txuas qhov suav nrog mini LED matrix rau hauv lub taub hau. Plug lub matrix rau hauv lub khob cij thiab txuas nws raws li hauv qab no:

  • Txuas CLK tus pin ntawm Lub Hnab Hnab rau tus pin analog 5 ntawm Arduino.
  • Txuas DAT tus pin rau tus pin analog 4 ntawm Arduino.
  • Txuas GND rau tus pin hauv av ntawm Arduino.
  • Txuas VCC+ rau 5v zog.

Rub tawm Adafruit LED Backpack lub tsev qiv ntawv thiab Adafruit GFX cov tsev qiv ntawv thiab teeb tsa lawv hauv koj lub khoos phis tawj los ntawm kev luam txhua tus mus rau "lub tsev qiv ntawv" nplaub tshev ntawm koj lub computer Arduino daim duab kos. Xa cov ntawv "matrix8x8" rau koj Arduino thiab txheeb xyuas tias lub hnab ev ntawv LED ua haujlwm. Cov pins ntawm LED matrix yuav tsis ua rau muaj kev sib cuag tau zoo hauv cov poj niam lub taub hau, yog li koj yuav xav tau qoj ib ce lossis tshem tawm ib nrab txhawm rau txhawm rau sib cuag thiab tso cai rau txhua kab thiab kab kom pom kev. Rov ua dua cov txheej txheem nrog lub hnab ev ntawv LED thib ob, tab sis lub sijhawm no koj yuav tsum teeb tsa qhov chaw nyob tshiab rau nws los ntawm kev siv lub jumper hla hla A0 cov pawm ntawm lub hnab ev ntawv. Khiav qhov "matrix8x8" code dua, tab sis hloov kab "matrix.begin (0x70)" mus rau "matrix.begin (0x71)" kom cov cai hais txog lub hnab ev khoom tshiab LED.

Kauj Ruam 4: Txuas Joystick

Txuas Joystick
Txuas Joystick
Txuas Joystick
Txuas Joystick

Koj tus joystick yuav tsum muaj plaub qhov hloov pauv nrog ob lub davhlau ya nyob twg. Thaum koj txav koj lub joystick mus rau sab xis nws ua rau hloov mus rau sab laug, thaum koj txav nws qis nws ua rau hloov mus rau saum, thiab ntxiv rau. Ntawm ib lub davhlau ya nyob twg ntawm txhua qhov hloov pauv, xaim 3 "xaim. Twist lwm qhov kawg ntawm tag nrho plaub ntawm cov xov hlau no ua ke thiab muab lawv txuas rau 12" xaim. Qhov no yog ib qho hauv paus rau tag nrho plaub qhov hloov pauv. Solder 12 "xaim mus rau qhov davhlau ya nyob twg ntxiv ntawm txhua qhov hloov pauv, tom qab ntawd txuas lawv raws li hauv qab no:

  • Txuas qhov hloov hauv qab (qhib thaum koj thawb) rau analog pin 0 ntawm Arduino.
  • Txuas sab laug (qhib thaum koj thawb sab xis) mus rau tus lej pin 1 ntawm Arduino.
  • Txuas qhov hloov pauv sab saum toj (qhib thaum koj thawb) rau analog pin 2 ntawm Arduino.
  • Txuas txoj cai hloov (qhib thaum koj thawb sab laug) mus rau tus lej pin 3 ntawm Arduino.
  • Txuas cov xaim hluav taws xob sib txuas rau tus pin hauv av ntawm Arduino.

Kauj ruam 5: Programming Game

Programming Game
Programming Game

Rub tawm qhov txuas Pumpktris.ino.zip, unzip nws, thiab qhib cov ntawv hauv Arduino kev txhim kho ib puag ncig. Sau thiab xa nws mus rau koj Arduino. Tam sim no koj yuav tsum tuaj yeem ua si ntawm lub mini LED matrix uas koj teeb tsa hauv cov kauj ruam dhau los. Kuv tau sim tawm tswv yim txog cov cai ntau li ntau tau, tab sis ntawm no yog qhov dav dav ntawm cov txheej txheem tseem ceeb: Piav Qhia Cov Duab Muaj xya tetrominos, txhua tus nrog 4 pixels, thiab txhua nrog plaub qhov kev hloov pauv tau. Peb khaws tag nrho cov no hauv ntau qhov ntau qhov: thawj qhov loj uas suav nrog xya daim duab, qhov thib ob uas muaj plaub qhov kev hloov pauv rau txhua tus duab, qhov thib peb muaj plaub qhov kev piav qhia pixel uas txhua tus muaj X thiab Y ua haujlwm. Piv txwv li, qhov no piav qhia qhov "T" zoo:/ * T */ {/ * lub kaum ntse ntse 0 */ {{0, 1}, {1, 1}, {2, 1}, {1, 2}},/ * lub kaum ntse ntse 90 */ {{1, 0}, {1, 1}, {2, 1}, {1, 2}},/ * lub kaum ntse ntse 180 */ {{1, 0}, {0, 1}, {1, 1}, {2, 1}}, / * angle 270 * / {{1, 0}, {0, 1}, {1, 1}, {1, 2}}}

Txheeb Xyuas Cov Khoom Siv Kom Kom taug qab ntawm cov thooj tam sim no hauv kev ua si, qhov kev zov me nyuam tswj hwm tus nquag ua haujlwm sib txawv. Qhov no yog qhov ntsuas ntawm qhov ua haujlwm zoo nyob hauv qib siab tshaj plaws ntawm cov kab. Nws tseem ua kom muaj kev sib hloov sib txawv uas muaj qhov ntsuas ntawm kev sib hloov tam sim no. Ib qho xOffset sib txawv txav deb npaum li cas sab laug lossis sab xis (0-7) txhua daim yog, thiab yOffset taug qab deb npaum li cas (0-15) pawg thawj coj saib nws poob lawm. Txhawm rau kos cov haujlwm ua haujlwm qhov program ntxiv X thiab Y offset qhov tseem ceeb rau X thiab Y kev tswj hwm ntawm txhua lub pixel rub los ntawm kev sib hloov tam sim no ntawm daim uas tau xaiv. daim, nrog txhua byte sawv cev rau kab. Piv txwv li, kab ntawv hauv qab no yuav sawv cev rau tus duab L zaum hauv nruab nrab ntawm ob kab hauv qab (raws li qhia los ntawm 1s hauv ob lub bytes dhau los): byte sampleGrid [16] = {B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00100000, B00111000}; Kev Tshawb Xyuas Kev Sib tsoo Thaum muaj kev sim ua kom txav cov khoom ua haujlwm, txoj haujlwm ua ntej kuaj xyuas txoj haujlwm tshiab tiv thaiv kab ntawm cov khoom ruaj khov. Yog tias tsis muaj kev sib tsoo, kev tso cai txav mus los thiab rov ua dua tshiab. Yog pom muaj kev sib tsoo thaum sim txav mus rau sab laug, sab xis, lossis kom tig mus, qhov kev txwv yog txwv. Yog tias muaj kev sib tsoo raug kuaj pom thaum sim ua kom poob ib qho, cov khoom ua tiav nyob rau hauv nws txoj haujlwm thiab tau ntxiv rau cov kab ntawm cov pixels ruaj khov. Txhua lub voj voos ntawm txoj haujlwm nce stepCounter, thiab txhua lub sijhawm stepCounter mus txog qhov suav khaws cia hauv gravityTrigger, nws poob qhov khoom ua haujlwm ib qib. Raws li qhov kev ua si nce mus, lub ntiajteb txawj nqus poob qis yog li cov khoom ua haujlwm tau poob ntau thiab ntau zaus txog thaum kawg nws tau poob rau hauv txhua lub voj ntawm qhov haujlwm. Txhua lub sijhawm cov khoom nquag tau tsau rau kab sib chaws qhov kev zov me nyuam txheeb xyuas tag nrho bytes/kab (B11111111). Yog tias nws pom ib qho, nws ntsais lawv tawm thiab ntawm peb zaug, tom qab ntawd tshem tawm lawv thiab poob cov kab saum toj no txhawm rau txhawm rau qhov sib txawv. tus nqi dhau los hauv kab "matrixTop.setRotation (1);" thiab/lossis "matrixBottom.setRotation (1);" hauv kab "teeb tsa ()". Yog tias cov khoom pib hauv qhov tsis sib xws, hloov qhov chaw nyob ntawm txhua tus lej lossis thim qhov chaw nyob tshaj tawm hauv "matrixTop.begin (0x70);" thiab "matrixBottom.begin (0x71);" kab ntawm "teeb tsa ()" lub voj. Yog tias qee kab lossis kab tsis pom kev, ua rau lub ntsej muag me me LED hauv tus poj niam lub taub hau. Tej zaum lawv yuav tsis muaj kev sib cuag zoo.

Kauj Ruam 6: Txuas Koj Li Matrix LED

Txuas Koj Cov Matrix LED
Txuas Koj Cov Matrix LED
Txuas Koj Cov Matrix LED
Txuas Koj Cov Matrix LED
Txuas Koj Cov Matrix LED
Txuas Koj Cov Matrix LED

Thaum tag nrho cov cai thiab kev tswj hwm tau lees paub tias ua haujlwm nrog mini LED matrices, nws yog lub sijhawm los ntsaws rau hauv qhov loj LED matrices koj muag koj tus kheej.

Koj tuaj yeem ntsaws txhua lub xaim rau hauv lub taub hau ntawm lub hnab ntim khoom ntawm tus kheej, tab sis koj yuav zaum ua ntau qhov ntsaws thiab tshem tawm, yog li qhov ntawd tuaj yeem ua rau muaj teeb meem tiag. Hloov chaw koj xav kom txhuam cov xaim mus rau tus txiv neej lub taub hau taub hau thiab ntsaws rau hauv lub hnab ntim khoom matrix. Kuv tau teeb tsa kab ntawv kab taub hau ntawm ib daim qauv ntawm pawg thawj coj saib yog li kuv tuaj yeem ntsaws thiab tshem tag nrho 16 tus pin ua ke. Kab 1-4 txuas rau tus pin 1-4 ntawm lub hnab ev ntawv (tus lej tus lej pib ntawm sab laug sab saum toj thaum koj tab tom saib ntawm lub hnab ev ntawv nrog 4-tus lej fais fab/hauv av/cov ntaub ntawv/moos pins saum toj). Kab 1-4 txuas rau tus pin 5-8. Tus lej tus lej qhwv ib ncig kom tus pin 9 nyob rau hauv qab txoj cai. Kab 5-8 txuas rau tus pin 12-9, thiab kab 5-8 txuas rau tus pin 16-13. Saib daim duab kom pom meej dua. Txuas txhua lub cim rau hauv lub hnab ev ntawv thiab ua haujlwm zoo ib yam "matrix8x8" qhov haujlwm uas koj tau ua rau lub mini LED matrices hauv qib 4. Yog tias nws tsis ua haujlwm, txheeb xyuas tias kab thiab kab ntawm qhov loj ntawm LED matrix tau txuas rau hauv tus pin raug ntawm lub hnab ev ntawv. Mounting LED matrix hauv ua npuas ncauj-core jig koj ua rau sib dhos tuaj yeem ua kom yooj yim los ntsuas tag nrho cov kab ke.

Kauj Ruam 7: Txiav lub taub dag

Carving Pumpkin
Carving Pumpkin
Carving Pumpkin
Carving Pumpkin
Carving Pumpkin
Carving Pumpkin

Tsis txhob ua ib qho carving ntawm taub dag kom txog thaum tag nrho koj cov khoom siv hluav taws xob ua haujlwm. Lub taub dag txua ntoo muaj lub txee lub neej txwv, thiab yog tias koj kos nws ua ntej thiab tom qab ntawd siv sijhawm 2 hnub ntawm cov khoom siv hluav taws xob, uas yog ob hnub ntawm kev ua si lom zem uas koj tau ploj lawm.

Nrhiav sab flattest ntawm lub taub dag kom koj lub vaj huam sib luag LED tsis qhwv nyob ib puag ncig ib puag ncig, tom qab ntawd txiav qhov qhib ntawm ib sab uas txawv. Ua siab dawb siab zoo; koj yuav xav tau chav kom tau koj txhais tes los ua haujlwm. Koj yuav tsis txiav sab saum toj zoo li ntawm taub dag ib txwm vim tias qhov ntawd yuav tsum tau tso tseg kom zoo rau lub joystick. Pumpkin goo thiab khoom siv hluav taws xob tsis yog phooj ywg zoo tshaj, yog li ntxuav sab hauv kom zoo. Txog qhov zoo tshaj plaws Pumpktris koj xav kom koj daim phiaj ntawm LEDs ncaj thiab ua kom zoo nrog taub dag. PDF tau txuas nrog 8x16 qhov sib nrug, ib nrab ntiv tes sib nrug. Luam qhov no (lossis ua koj tus kheej nrog koj tus kheej qhov sib nrug), txiav ib ncig ntawm ntug, thiab kaw nws mus rau ntawm lub taub dag taub hau. Nco ntsoov tias nws ncaj thiab ncaj. Nrog tus ntsia hlau, tus pas txhuam hniav, lossis lwm yam cuab yeej zoo sib xws, khawb lub qhov taub mus rau hauv nruab nrab ntawm txhua lub cim LED cim rau ntawm daim ntawv. Drilling ncaj qha los ntawm daim ntawv tsis qhia vim tias nws yuav hloov pauv lossis tsim kua muag. Thaum txhua qhov ntawm qhov kev sim tau raug thawb, tshem daim ntawv ntawv thiab siv 13/64 "ntsis hauv koj lub zog laum los laum txhua qhov. Tsis txhob kho qhov tho qhov sib dhos rau lub ntsej muag taub dag! Yog tias koj ua qhov no, curvature ntawm taub dag tuaj yeem ua rau lub qhov uas ib nrab ntiv tes sib nrug ntawm sab nraud kom tau sib ntsib sab hauv thiab nws yuav nyuaj rau ntxig cov LEDs. Xwb sim ua kom tag nrho cov qhov sib npaug. siv koj rab riam X-Acto los txiav lub xwmfab "pixel" nyob ib puag ncig txhua lub qhov. Ua lub kaum riam rau nruab nrab ntawm txhua lub qhov thiab tawm li 1/8 "ntawm cov pixels. Kuv qhia yuav kev xyaum ua taub dag thiab siv nws kom ua tiav koj cov txheej txheem drilling thiab pixel-carving. Master nws nyob ntawd ua ntej koj siv sijhawm los rhuav lub taub dag zoo tshaj uas koj pom rau cov khoom tiav.

Kauj Ruam 8: Mounting Stem rau Joystick

Mounting Stem rau Joystick
Mounting Stem rau Joystick
Mounting Stem rau Joystick
Mounting Stem rau Joystick
Mounting Stem rau Joystick
Mounting Stem rau Joystick
Mounting Stem rau Joystick
Mounting Stem rau Joystick

Tam sim no koj yuav hloov lub qia los siv ua tus joystick los tswj kev ua si.

Txiav qia tawm kom ze rau lub hauv paus ntau li ntau tau. Yog tias qhov txiav tsis du thiab tsis huv, siv cov xuab zeb los txhuam nws. Laum qhov 1-1/8 "qhov ncaj ncaj los ntawm lub hauv paus ntawm lub hauv paus thiab rau hauv taub dag. Rho tawm lub pob ntawm tus pas nrig thiab teeb tsa tus ncej nrog nruab nrab ntawm lub qhov los ntawm sab hauv taub dag. joystick yog plaub fab nrog lub ntsej muag pem hauv ntej ntawm taub dag-thaum koj ua si koj xav kom thawb sab laug thiab sab xis kom txav daim, tsis yog ntawm lub kaum ntse ntse. Thaum nws nyob nruab nrab thiab xwmfab, siv tus ntsia hlau lossis tus pas txhuam hniav txhawm rau txhawm rau sab hauv Lub taub dag saum toj ntawm lub qhov tso rau hauv lub hauv paus joystick. Tshem lub joystick. Nrog koj cov xaim txiav, txiav cov lus qhia nthuav tawm ntawm cov phab ntsa ntub dej kom lawv luv dua qhov tuab ntawm taub dag cov tawv nqaij. rau hauv qhov kev sim qhov koj tau ua. Cov ntsiab lus ntawm ntu tom ntej yuav nyob ntawm tus joystick koj yuav. Qhov uas kuv siv los ntawm SparkFun muaj 6mm txuas rau lub pob tuav uas yuav raug hloov los ntawm cov qia. Yog tias koj tus joystick sib txawv, siv qhov loj me me ntawm cov txiv ntoo thiab cov ntsia hlau sib phim nruab nrab ntawm cov qia thiab laum qhov 13/64 "qhov (qhov loj ib yam koj tau siv rau qhov LED qhov, ua ntu zus) txog ib nti ncaj rau hauv qia. Qhov no yuav yog cov kauj ruam zoo los ntsuas koj cov taub taub, kom paub tseeb tias cov ntsia hlau ntsia hlau nruj rau hauv lub qhov. Txiav lub taub hau tawm ntawm 6mm x 50mm ntsia liaj qhov rooj nrog hacksaw. Muab cov tshuaj epoxy lossis ntoo tso rau ntawm cov xov nyob ze qhov kawg ntawm cov ntsia hlau, thiab ntsia hlau rau hauv qia. Koj xav tau ib nti lossis ntau dua ntawm nws hauv qia thiab ib nti sab nraud. Ntsia lub 6mm txuas txiv ntoo rau ntawm lub joystick ncej, tab sis tsis txhob tsa lub joystick hauv taub dag tsis tau.

Kauj Ruam 9: Kev Tso Npe LED thiab Joystick

LED thiab Joystick Placement
LED thiab Joystick Placement

Los ntawm sab hauv ntawm taub dag, ntxig cov LEDs ua kab ua kab rau hauv lawv lub qhov kom txog thaum lawv cov hauv paus tau yaug nrog sab hauv sab hauv ntawm taub dag. Thaum txhua yam nyob hauv qhov chaw, siv tus pas xyoob los thawb lawv ntxaum mus rau hauv ntej. Kuv tawm ntawm lawv sab xub ntiag zaum li 1/4 "txog 3/8" hauv qab sab nrauv. Yog tias lawv nyob deb dhau ntawm qhov chaw, lub teeb yuav nchuav rau hauv lub taub dag cov nqaij thiab txhua lub pixel yuav tsis txawv.

Ntxiv ib txheej yas qhwv rau sab saum toj ntawm tus joystick, nrog tus ncej nws tus kheej poking los ntawm. Qhov no yuav khaws tsawg kawg qee qhov dej noo los ntawm kev nkag mus rau nws. Txuas tus joystick nrog 1/2 ntsia hlau rau hauv lub tog phab ntsa qhuav.

Kauj Ruam 10: Ua Si Game

Ua Si Game
Ua Si Game

Muab lub tais los yog yas ntim khoom noj ntim rau hauv qab ntawm taub dag kom tsis txhob siv cov khoom siv hluav taws xob los ntawm kov hauv qab. Ntau lub joystick rau hauv koj Arduino, lub hnab LED coj mus rau hauv Arduino, thiab cov LED matrices rau hauv lub hnab ev ntawv. Txuas lub hwj chim los rau hauv koj Arduino. Tam sim no ua si koj tus kheej qee qhov Pumpktris! Hloov chaw ntawm kev ua si, koj tuaj yeem tso saib cov lus ntawm koj lub jack-o-lantern. Tej zaum koj yuav xav teeb tsa cov ntawv matrices ib sab (16 dav los ntawm 8 siab), lossis txawm tias siv tsuas yog ib lub zeem muag. Lub Qhov Tsis Txaus Ntseeg Koj Lub taub dag thaum kawg yuav pib rot thiab tawm tuaj pwm thiab kab mob. Qhov no tuaj yeem txaus ntshai rau koj kev noj qab haus huv thiab tuaj yeem ua rau muaj qhov tsis zoo hauv koj cov khoom siv hluav taws xob. Nws yog qhov zoo tshaj plaws los rub tawm txhua yam ntawm koj cov khoom siv hluav taws xob thaum koj pom ib qho kev loj hlob ntawm lossis hauv taub dag, yog li koj tuaj yeem rov siv lawv tom qab yam tsis tas yuav tsum tau ntxuav Haz-Mat.

Halloween Decoration Contest
Halloween Decoration Contest
Halloween Decorations Contest
Halloween Decorations Contest

Qhov khoom plig thib ob hauv kev sib tw Halloween Decorations Contest

Pom zoo: