Cov txheej txheem:
- Kauj Ruam 1: Sau cov Cheebtsam
- Kauj Ruam 2: Kos rau ntawm Styrofoam
- Kauj Ruam 3: Sandpapering cov LEDs (xaiv tau)
- Kauj Ruam 4: Npaj Cov Hluav Taws Xob
- Kauj Ruam 5: Siv cov LEDs
- Kauj Ruam 6: Kev Sib Tham Squares Ua Ke
- Kauj Ruam 7: Kho lub voos xwmfab rau hauv Circuit Board
- Kauj Ruam 8: Kuaj Cov Txuas Txuas
- Kauj Ruam 9: Sim LED Cube
- Kauj Ruam 10: Txuas Joystick thiab Khawm
- Kauj ruam 11: Muaj kev lom zem:)
Video: 3D Tic-Tac-Toe ntawm Led Cube: 11 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
Koj puas tau xav ua si Tic Tac Toe hauv 3 qhov ntev hauv tsev?
Yog tias cov lus teb yog yog, Cov Lus Qhia no muab rau koj nrog txhua cov ntaub ntawv tsim nyog los tsim ib qho.
Qhov kev ua si tuaj yeem ua si ntawm 3x3x3 coj lub voos xwmfab. Txhua lub ntsiab lus yog ib leeg-xim coj, txhua LED yuav tsum tau tswj ib tus zuj zus. Ua si tic-tac-ntiv taw tsawg kawg 3 qhov cim sib txawv yog qhov tsim nyog, (feem ntau yog o x thiab tsis muaj dab tsi) txawm li cas los xij nyob rau hauv ib lub xim LED lub voos xwmfab uas yuav ua tsis tau.
Kev daws teeb meem yog coj flashing. Thaum qhov kev ua si tau pib ua txhua tus coj tawm, thawj tus neeg ua si ua si nrog qhib rau coj, tus thib ob tus neeg siv nrog lub teeb nyem, yog li kev ua si tuaj yeem ua li ntawd.
Lub joystick thiab lub pob tso cai rau koj xaiv LED qhov koj xav tso koj "kos npe".
Tau kawg, koj tuaj yeem siv koj lub voos xwmfab LED ua kev kho kom zoo nkauj. Ib txoj cai tau muab uas ua rau LEDs nyem zoo ib yam li hauv cov vis dis aus, lossis ib qho tom qab ib leeg.
Kauj Ruam 1: Sau cov Cheebtsam
Cov npe ntawm cov khoom tsim nyog los tsim qhov kev ua si:
- 22*30 Universal Circuit Board (lossis loj dua)
- Arduino UAS
- 27 LEDs (Kuv siv 3 hli LEDs)
- Joystick module (KY-023)
- Khawm module (KY-004)
- 20 M-F jumper xov hlau
- Hlau
- Cov xov hlau yooj ywm
- 12 F-F txuas
Cov cuab yeej tsim nyog
- Styrofoam Nws yuav ua rau koj txoj haujlwm yooj yim dua!
- Cov khoom siv Soldering
- Kub-kua nplaum phom
- Pinchers
- Cable-peeler
- Tus kav
- Sandpaper (yeem)
Kauj Ruam 2: Kos rau ntawm Styrofoam
Ua 3x3 cov cim rau ntawm ib qho styrofoam thaiv thiab muab lub qhov rau LEDs kom haum. Koj yuav tsum siv tus pas ntsuas los ua qhov ntawd.
Kauj Ruam 3: Sandpapering cov LEDs (xaiv tau)
Txhawm rau ua kom pom kev loj dua, koj tuaj yeem siv cov ntawv xuab zeb los txhuam cov LEDs.
Kauj Ruam 4: Npaj Cov Hluav Taws Xob
Cov xov hlau nthuav tawm yuav tsum yog 4.5 cm ntev, npaj 24 ntawm lawv. Cov no yuav yog lub thav duab ntawm lub voos xwmfab.
12 lub xov hlau hloov pauv tau yuav tsum tau npaj. 9 ntawm lawv yuav tsum yog 6-7 cm ntev. 3 ntawm lawv yuav tsum yog 12-13 cm. Tshem tawm ob qho kawg ntawm cov xov hlau.
Kauj Ruam 5: Siv cov LEDs
Ua ntej tshaj plaws, peb tab tom txuas qhov tsis zoo ua ke, qhov no feem ntau yog luv luv ntawm LED.
Muab cov LEDs tso rau ntawm styrofoam uas tau npaj ua ntej. Muab cov xov hlau raws li qhia hauv daim duab dua li qhwv cov ceg luv ib ncig ntawm cov hlau. Tom qab ntawd muab cov hlau txuas rau cov hlau kom zoo zoo, tom qab ntawd muab cov hlau txuas rau ntawm ob sab, qhov no yuav ua rau lub xwmfab ua ke.
Nws yog qhov tseem ceeb uas thaum koj npaj tau nrog ib lub xwmfab, ntsuas txhua 9 LEDs. Nws tuaj yeem ua tiav los ntawm kev txuas cov kab hlau txuas rau hauv av ntawm Arduino. Tom qab ntawd siv M-M Jumper xaim thiab txuas nws mus rau 3.3 V ntawm Arduino, thiab kov lwm sab mus rau qhov tsis muaj qhov muag ntawm LED, LED yuav tsum teeb. Yog tias tsis muaj LED teeb, tej zaum ib qho ntawm cov ceg zoo kov cov hlau kab, koj yuav tsum txheeb xyuas cov no.
Koj yuav tsum npaj 3 lub xwmfab LED.
Kauj Ruam 6: Kev Sib Tham Squares Ua Ke
Qhov no yog qhov nyuaj tshaj plaws, koj yuav tsum thov kom muaj tes pab nyob rau theem ntawd.
Muab ib lub xwmfab ntawm lub styrofoam, tom qab ntawd lo ib lub xov tooj ntawm ib sab ntawm LED, hauv txoj haujlwm ntsug. Nws yog ib qho tseem ceeb uas cov xov hlau XWB kov tau ob txhais ceg zoo ntawm LEDs. Qhwv cov ceg zoo (tus uas koj tseem tsis tau soldered) nyob ib puag ncig ntawm cov hlau thiab muab tshuaj txhuam rau nws. Ua nws nrog txhua LED.
Muab lub xwmfab thib ob rau qhov siab 2 cm. Qhwv ob txhais ceg zoo nyob ib ncig ntawm cov xov hlau ntsug. Lub xwmfab yuav nyob ntawm qhov ntawd, yog li koj tuaj yeem txhuam txhua tus tom qab ntawd.
Tom qab ntawd tso lub xwmfab kawg hauv qhov siab ntawm 4 cm. Ua cov kauj ruam tib yam li ua ntej.
TSEEM CEEB: Cov kab hlau kab rov tav yuav tsum tsis txhob kov cov kab ntsug.
Tom qab koj tau npaj nrog cov kauj ruam koj yuav tsum txheeb xyuas txhua lub LED zoo li ua ntej.
Kauj Ruam 7: Kho lub voos xwmfab rau hauv Circuit Board
Ua ntej tshaj plaws, koj yuav tsum siv 9 cov xov tooj pauv tau yooj yim.
Ntxig ib sab ntawm cov xaim hla lub qhov hauv lub rooj sib tham hauv Circuit Court, muab nws txuas rau kab rov tav. Ua nws nrog txhua kab xov kab rov tav. Tom qab ntawd kho lub voos xwmfab rau lub rooj tsavxwm, los ntawm kev thov kub-kua nplaum.
Qhov thib ob, siv 3 lub xov tooj hluav taws xob hloov pauv tau ntev dua.
Muab lawv tso rau hauv lub xwmfab, thiab tom qab ntawd ntxig cov ntawd hla lub qhov (Koj tuaj yeem siv lub qhov loj dua ntawm kaum ntawm pawg thawj coj saib)
Thaum koj npaj txhij nrog cov kauj ruam koj muaj 12 xov hlau dai rau hauv qab ntawm lub rooj tsavxwm. Qhov 3 xov txuas nrog rau cov xwm txheej yuav tso cai rau koj xaiv LED hauv txoj kab ntsug. 9 lub xov hlau yuav tso cai rau koj xaiv kab ntawv uas koj xav teeb lub teeb ci LED.
Kauj Ruam 8: Kuaj Cov Txuas Txuas
Muab cov kab txuas txuas rau saum toj. Koj yuav tsum cais cov kab rov tav thiab ntsug ib yam li kuv tau ua.
Solder 9 cov xov hlau rau cov txuas, raws li qhia hauv daim duab.
Tom qab ntawd muab cov xaim 3 txuas rau 3 txuas. Txuas cov xaim los ntawm sab saum toj mus rau tus pin 10, nruab nrab mus rau 11th thiab hauv qab mus rau 12th, thiab muab lawv tso rau hauv.
Kaw cov xov hlau tas rau ntawm lub rooj tsavxwm.
Koj lub voos xwmfab LED tau npaj tiav, koj yuav tsum sim tam sim no.
Kauj Ruam 9: Sim LED Cube
Txuas 1-9 ntawm LED lub voos xwmfab mus rau D0-D8 hauv Arduino (1 txog D0, 2 rau D1…)
Txuas 10-12 rau Arduino li:
- 10 rau D11
- 11 rau D10
- 12 rau d9
Tshaj tawm cov cai muab rau Arduino.
LedRandom () muaj nuj nqi yuav ua rau cov LED nyem nyem
LedSeq () muaj nuj nqi yuav ua rau LEDs nyem rau hauv ib kab tom qab lwm qhov.
LedWrite (x, y, z, v) ua haujlwm tso cai rau koj sau ib qho LED ntawm lub voos xwmfab. x, y, z yog qhov chaw nyob, lawv yuav tsum nyob nruab nrab ntawm 1-3. v yog lub xeev ntawm LED, thaum 0 lub LED yuav tua, thaum 1 lub LED yuav qhib.
Koj tuaj yeem pom ntau LEDs cais. Tab sis xob laim LED ua rau ib qho ua ntej tua. Tab sis qhov ncua sijhawm tsuas yog 0.5ms yog li koj yuav pom lawv ob leeg qhib.
Kuv yuav sim txhim kho qhov haujlwm no rau yav tom ntej.
Kauj Ruam 10: Txuas Joystick thiab Khawm
Lub joystick module yuav tsum nyob hauv tib txoj haujlwm li lub voos xwmfab LED (raws li qhia hauv daim duab)
Khawm module:
- Txuas tus - rau Arduino GND
- Txuas tus + (tus pin nruab nrab) rau Arduino 5V
- Txuas S (tus pin tso tawm) rau Arduino A3
Joystick Module:
- SWV to A2
- XEV to A1
- VRX to AWM
- +5V rau Arduino 5V
- GND rau Arduino GND.
Tom qab ntawd kho cov qauv thiab LED lub voos xwmfab ntawm lub dav hlau yas, thiab xa cov cai mus rau Arduino.
Kauj ruam 11: Muaj kev lom zem:)
Koj 3D Tic-Tac-Toe tau npaj txhij.
Nov yog cov lus qhia luv yuav ua li cas:
- Player 1 ua si nrog tig rau LED
- Player 2 ua si nrog ntsais muag LED
- LED ntsais sai dua, thaum koj nyob ntawm LED.
- Koj tuaj yeem xaiv koj lub LED nrog Joystick. Nyem nrog Joystick tso cai rau koj nqes mus. (los ntawm qib thawj, nws yuav mus rau qib peb)
- Laub lub pob kom tso koj kos npe rau ntawd. (Nws yuav tso nws qhov twg LED ntsais sai)
- Tus yeej yog tus uas khaws peb lub cim hauv x, y lossis z qhia. (Cov kab pheeb ces kaum tseem tsis suav nrog)
-
Thaum ib tus neeg yeej rau saum lub ces kaum sab xis saum toj yuav ci thiab yog tias
- Player 1 yeej. Thawj kab teeb
- Player 2 yeej. Kab thib ob teeb tuaj
- Qhov kev ua si tseem yuav qhia koj txog qhov chaw uas koj tau sau koj 3 yam cim.
- Txhawm rau pib qhov kev ua si tshiab, thawb lub joystick rau ob peb feeb.
Tseem ceeb: Ib txwm thawb lub pob rau ib pliag, thiab khaws tus joystick rau ib nrab ob.
Kuv tab tom npaj txhim kho qhov kev ua si yav tom ntej, suav nrog suav nrog kab pheeb ces kaum.
Yog tias koj muaj lus nug sau ntawv tawm lossis lus.
Pom zoo:
Plotting Real-time Graph ntawm Android Los Ntawm Arduino Los Ntawm HC-05: 3 Cov Kauj Ruam
Plotting Real-time Graph ntawm Android Los ntawm Arduino Los ntawm HC-05: Hav nyob ntawm no, ntawm no yog kev qhia qhia yuav ua li cas npaj cov phiaj xwm ntawm lub sijhawm tiag tiag ntawm qhov tseem ceeb los ntawm tus tswj hwm micro xws li Arduino rau lub app. Nws siv Bluetooth qauv xws li HC-05 los ua lub cuab yeej xa xov mus rau kis thiab tau txais cov ntaub ntawv ntawm Ar
Tsim thiab Ua tiav ntawm Cov Txheej Txheem ntawm Kev Taw Qhia ntawm Photovoltaic Panels: 5 Cov Kauj Ruam
Tsim thiab Ua kom tiav ntawm Cov Txheej Txheem ntawm Kev Taw Qhia ntawm Photovoltaic Panels: Tsim thiab Ua tiav ntawm Cov Txheej Txheem ntawm Kev Taw Qhia ntawm Photovoltaic Panels
Kev tswj hwm tus kheej ntawm RPM ntawm Lub Cav Siv Lub Tswv Yim Los Ntawm IR Raws Li Tachometer: 5 Cov Kauj Ruam (nrog Duab)
Kev Tswj Tus Kheej ntawm RPM ntawm Lub Cav Siv Lub Tswv Yim Los Ntawm IR Raws Lub Tachometer: Muaj ib txwm xav tau rau kev siv tshuab txheej txheem, ua nws yooj yim/tsis txaus ntseeg. cov txheej txheem rau dej/siv dej rau peb daim av me me.Qhov teeb meem ntawm tsis muaj kab khoom siv tam sim no
Zaub Cov Duab Tawm ntawm PSP/Lub Xov Tooj Ntawm Lub Xov Tooj Ntawm Digital Duab: 3 Kauj Ruam
Zaub Cov Duab Tawm PSP/Lub Xov Tooj Ntawm Lub Xov Tooj Ntawm Tus Duab: Zoo … lub npe hais tias txhua yam tiag tiag … Qhov no yog qhov qhia tau yooj yim heev thiab nws tsis xav tau kho vajtse lossis software ntau dua li koj yuav tsum muaj ! Cov Lus Nug Qhia Rau Kuv lossis Tawm Tswv Yim! Koj tsis tas yuav hloov kho kom ua
Cov lus qhia ntawm Kev Ua Kom Zoo Mock-Up ntawm Track Slide Tsim rau Nqa/Txo Hauv Pem Hauv Ntej-Mounted Footrests ntawm Lub Hwj Huam Log: 9 Kauj Ruam (nrog Duab)
Cov lus qhia ntawm Kev Ua Kom Tiav Mock-Up ntawm Track Slide Tsim rau Nqa/Sab Qaum Nruab Nrab-Mounted Footrests ntawm Lub Hwj Huam Lub Rooj Zaum: Lub hauv paus tau teeb tsa lub tog zaum kom nqa tau hauv qab lub rooj kom zoo, thiab qis dua kom siv tau. Ib lub tswv yim rau kev ua haujlwm ywj pheej ntawm kev tuav cov footrest thiab kev xa tawm tsis suav nrog lub rooj zaum fais fab lag luam, thiab PWC cov neeg siv tau qhia txog qhov xav tau