Cov txheej txheem:
- Kauj ruam 1: Yuav tsum tau ua
- Kauj Ruam 2: Twister Mat
- Kauj Ruam 3: Vaj Tsev
- Kauj ruam 4: Electronics
- Kauj Ruam 5: Teeb Raspberry PI
- Kauj ruam 6: Database
- Kauj ruam 7: Code
- Kauj Ruam 8: Kev Pab Cuam
- Kauj Ruam 9: Cov lus qhia
Video: Kev sib tham Twister: 9 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Twister yog kev ua si hauv tsev neeg ib txwm muaj thiab kuv paub tseeb tias txhua tus neeg uas nyeem Cov Lus Qhia no yam tsawg kawg tau ua si ib zaug. Lub hom phiaj tseem ceeb ntawm qhov kev ua si yog tus txiv neej zaum kawg sawv ntawm daim ntaub thiab xyuas kom koj tsis txhob poob thaum ua cov haujlwm uas tau xaiv los ntawm lub log tig.
Qhov teeb meem yog nrog txhua qhov kev ua si ntawm Twister, ib txwm yuav tsum muaj ib tus neeg uas tig lub log. Puas yog nws yuav yooj yim dua yog tias txhua qhov no tuaj yeem tshwm sim tau? Txoj kev ntawd txhua tus tuaj yeem muaj kev lom zem thaum ua si Twister.
Kuv yog menyuam kawm ntawv ntawm NMCT ntawm Howest Kortrijk. Nov yog lossis qhov haujlwm kawg hauv peb thawj xyoo.
Hauv Cov Lus Qhia no Kuv yuav piav qhia yuav ua li cas kuv tsim kev sib tham Twister game thiab koj yuav tsim nws li cas hauv tsev.
Kauj ruam 1: Yuav tsum tau ua
- Raspberry Pi
- T-cobbler
- Twister kev ua si
- Stepper lub cev muaj zog
- SIB 8825
- LDR
- Capacitators (100 µf thiab 10 µf)
- Cov kab hauv cov xim sib txawv
- Aluminium ntawv ci
- Txoj kab ciav hlau
- Daim kab xev hluav taws xob
- Daim kab xev ob tog
- Velcro
- Ntoo ntoo
- Breadbord
- Perfboard (yeem)
- Poj niam lub taub hau (xaiv tau)
- 5V adapter rau Raspberry Pi
- 12 V adapter
- 2 x MCP23017
Kauj Ruam 2: Twister Mat
Yuav tsum:
- Yob ua npuas ncauj
- Twister ntaub
- Txoj kab ciav hlau
- Aluminium ntawv ci
- cov kab
- tus cim
Cov lus qhia:
Ua daim lev yog qhov ua haujlwm tshaj plaws ntawm tag nrho txoj haujlwm. Nws tsis nyuaj rau kev sib sau tab sis koj tsuas yog yuav tsum rov ua txhua yam 24 zaug. Nws kuj tseem cuam tshuam ntau ntawm ductape … thiab kuv txhais tau ntau heev.
Txhawm rau pib koj yuav tsum txiav 2 daim ua npuas dej uas muaj qhov loj ib yam li Twister lev. Kuv siv ua npuas dej uas siv los tso rau hauv qab parquet plag tsev. Qhov teeb meem nrog qhov ntawd yog tias ua npuas ncauj yog nyias nyias. Yog tias koj tuaj yeem pom ua npuas dej uas tsawg kawg 2mm, qhov ntawd yuav zoo dua thiab koj yuav muaj haujlwm tsawg los ua daim ntaub tab sis kuv yuav rov qab los tom qab.
Nyob rau thawj txheej ntawm ua npuas ncauj koj yuav tsum muab plaub kab txaij ntawm cov ntawv txhuas txhuas hla ntawm qhov ua npuas ncauj. Cov no yuav raug siv ua av rau hauv Circuit Court. Txoj hauv kev zoo tshaj los muab nws yog tso ductape hla ob sab.
Muab cov txheej txheej ua npuas ntxiv rau saum Twister lev. Kos lub voj voog rau txhua qhov teev ntawm Twister lev. koj yuav tsum txiav ib lub qhov ntawm txhua lub voj voog ntawm lub npaus. Txoj kab uas hla ntawm lub qhov tsis yog qhov tseem ceeb, tsuas yog xyuas kom nws tsis loj heev lossis me me.
Txhua lub qhov yuav tsum tau npog los ntawm cov ntawv txhuas. Ib txoj hauv kev zoo tshaj los muab nws yog ductape. Nco ntsoov tias tsis muaj thaj ua rau kom zam kev ua txhaum.
Qhov no tsis tsim nyog tab sis yog tias siv ua npuas dej tsawg dua 2mm, koj yuav tsum tau muab qee yam ua kom siab ntxiv ntawm txhua lub qhov kom tiv thaiv cov ntawv ci los ua ke. Kuv siv cov txiv laum huab xeeb me me uas tuaj nrog ntim khoom ntawm kuv cov khoom.
Kauj ruam kawg yog cabling. Txhua thaj xav tau 1 kab. Cov av thaj av tuaj yeem txuas nrog ib leeg thiab tom qab ntawd nrog Raspberry pi.
Kauj Ruam 3: Vaj Tsev
Yuav tsum muaj
- ntoo ntoo
- ntsia hlau
- laum
- cov velcro
Cov lus qhia:
Medidas: 32 cm x 30 cm x 8 cm
Lub tsev nyob tsuas yog lub thawv yooj yim-tsim. Koj tuaj yeem pom cov phiaj uas koj xav tau hauv ib qho ntawm cov duab saum toj no. Cov ntoo tau pom hauv kuv lub tsev muag khoom hauv zos. Kuv tsis yooj yim thiab rau tus nqi me me lawv pom ntoo thiab koj twb paub lawm tias nws yuav yog qhov ntev.
Txhawm rau sib sau ua ke lub thawv Kuv tsuas yog siv cov ntsia hlau rau hauv qab. Qhov ntev ntawm cov ntsia hlau tsis yog qhov tseem ceeb. Tsuas yog xyuas kom lawv ntev dua qhov siab ntawm cov phaj hauv av thiab tias lawv tsis ntev heev kom lawv yuav tawg ntoo.
Hauv nruab nrab ntawm lub hau koj yuav tsum tau siv lub qhov me me kom haum rau lub cav. Lub qhov yuav tsum yog 5 hli txoj kab uas hla.
Lub hau tau txuas nrog lub thawv siv velcro.
Qhov kawg uas koj yuav tsum tau ua yog ua lub qhov nyob rau pem hauv ntej rau cov hlua ntawm Twister lev thiab lub qhov nyob tom qab rau ob qho hloov pauv. Txoj kab uas hla ntawm lub qhov nyob ntawm cov hloov pauv uas koj siv thiab koj tuaj yeem tswj hwm cov hlua ntawm koj lub lev. Kuv hlais ib lub qhov rau kab lev vim kuv tsis muaj lub laum uas loj txaus.
Kauj ruam 4: Electronics
Yuav tsum:
- SIB 8825
- Stepper lub cev muaj zog
- 2 tx23017
- LDR
- 100 µF electrolytic capacitor
- 10 µF electrolytic capacitor
- Raspberry Pi T-cobbler
- 24 x 330 ohm resistor
Cov lus qhia:
Txoj hauv kev nrawm tshaj plaws los ua txhua yam khoom siv hluav taws xob yog muab nws tso rau ntawm lub khob cij. Qhov teeb meem yog tias tsis muaj dab tsi raug kho thiab qee qhov khoom tuaj yeem xoob. Txoj hauv kev zoo tshaj plaws yog siv txhua yam ntawm lub pcb. Kuv soldered tus tsav tsheb tsav tsheb thiab lub sensor. Kuv tso ob lub IO nthuav tawm ntawm lub khob cij vim tias ntau cov xov hlau mus rau MCP23017's. Koj yuav ua li cas no yog nyob ntawm koj nkaus xwb.
Qee qhov sidenotes ntawm kev thaiv:
Stepper lub cev muaj ob txoj hlua txuas. Cov xov hlau los ntawm cov khub ntawm kuv lub cav qhov twg:
dub, ntsuab -> khub 1
liab, xiav -> khub 2
Nco ntsoov tias cov tswv yim los ntawm Twister lev tau txuas nrog hauv qhov raug. Thawj qhov txuas nrog GPA0 ntawm thawj MCP23017. Qhov kawg tau txuas nrog GPA7 ntawm MCP23017 thib ob. Xyuas kom tseeb tias muaj tus tiv thaiv qhov kawg ntawm txhua qhov kev tawm tswv yim.
Kauj Ruam 5: Teeb Raspberry PI
Yuav tsum:
- Raspberry PI PIB
- SD daim npav
- Ethernet cable
Cov lus qhia:
Rub tawm Raspian duab los ntawm https://www.raspberrypi.org/downloads/raspbian/. Nco ntsoov tias koj rub lub desktop version. Hlawv cov duab ntawm koj daim npav SD siv lub program hlawv. Kuv siv lwm yam, tab sis zoo siab siv lwm qhov program. Ua ntej koj muab daim npav SD hauv koj Pi, koj yuav tsum hloov qee yam nrog lub khoos phis tawj. Qhib lub khau raj cais ntawm SD-card. Koj tsis tuaj yeem qhib lwm qhov cais vim Windows tsis paub Linux. Hauv khau raj, qhib cov ntawv: "cmdline.txt". Thaum kawg ntawm cov ntawv, ntxiv kab: "ip = 169.2554.10.1". Nov yog qhov chaw nyob APIPA thiab siv los txuas lub pc thiab Pi hla ssh. Thaum qhov ntawd ua tiav, tsim cov ntaub ntawv ntawm ntu ntu uas hu ua "ssh" tab sis tsis muaj kev txuas ntxiv. Txoj kev ntawd Pi yuav pab ssh ntawm khau raj.
Txuas koj Pi rau koj lub PC nrog ib qho ethernet cable. Koj yuav tsum rub tawm qhov program kom ssh rau Pi. Kuv siv putty. Qhib putty thiab sau rau hauv APIPA chaw nyob (169.254.10.1) thiab qhib qhov txuas. Thaum PI thawj khau raj, nws yuav siv sijhawm me ntsis ua ntej txhua yam tau npaj txhij. Cia li tos ib pliag thiab rov sim dua yog tias koj txuas tsis tau. Thaum koj tuaj yeem txuas tau, nkag mus nrog tus txheej txheem pov thawj: username: pi, password: raspberry.
Yog tias koj xav tau koj tuaj yeem ua koj tus kheej siv. Tam sim no koj yuav tsum teeb tsa kev sib txuas hauv is taws nem. Yog tias koj xav siv wifi, koj tuaj yeem siv ob lo lus txib no:
wpa_passphrase 'SSID' 'Password' | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf
wpa_cli -i wlan0 reconfigure
Nruab cov program no siv cov lus txib hauv qab no:
sudo apt hloov tshiab && sudo apt install -y python3 -venv
python3 -m pip nruab -hloov kho pip setuptools log python3 -m venv --system -site -packages env
nab hab sej -m pip nruab mysql-connector-python argon2-cffi Flask Flask-HTTPAuth Flask-MySQL mysql-connector-python passlib flask-socketio
Kauj ruam 6: Database
Yuav tsum:
- Raspberry Pi
- Ethernet-kab
Daim ntawv thov siv cov ntaub ntawv khaws cia cov ntaub ntawv hais txog cov neeg siv, cov yeej thiab cov ntaub ntawv game.
Ua ntej teeb tsa qhov program db ntawm koj li Raspberry Pi. Koj twb tau teeb tsa Mysql ntawm Pi hauv qib dhau los.
Siv "sudo systemctl xwm txheej mysql" los ntsuas yog Mysql ua haujlwm.
Pib Mysql:
sudo mariadb
Tom qab ntawd sau cov cai hauv qab no:
Tsim tus neeg siv 'project_name-admin'@'localhost' IDENTIFIED BY 'adminpassword';
Tsim DATABASE project_name;
YOOJ YIM YOOJ YIM YOOJ YIM RAU PROJILEGES ON project_name.* Rau 'project1-admin'@'localhost' NROG QHOV ZOO TSHAJ PLAWS;
NTSEEG NTAWV QHOV TSEEB;
Hloov lub npe ntawm txoj haujlwm raws li koj nyiam.
Txhawm rau sau cov ntaub ntawv, khiav cov ntaub ntawv sql uas tau muab nrog cov cai tom qab ntawm cov lus qhia no.
Kauj ruam 7: Code
Koj tuaj yeem pom cov cai ntawm qhov txuas hauv qab no:
Tsuas yog clone lub chaw cia khoom rau koj li Raspberry Pi.
Nco ntsoov tias nws tau cloned hauv cov npe ncaj qha hauv qab koj cov neeg siv.
Kauj Ruam 8: Kev Pab Cuam
Txoj haujlwm yuav tsum pib thaum koj Raspberry Pi khau raj. Txhawm rau ua qhov ntawd koj yuav tsum ua qhov kev pabcuam ntawm koj daim ntawv thov.
Kev teeb tsa twb tau ua thiab nyob hauv kab ntawv conf.
Tsuas yog qhov koj yuav tsum tau ua kom cia qhov kev pabcuam pib ntawm khau raj yog kab kab no:
sudo systemctl pab kom project1.service
Qhov teeb meem tsuas yog tus pi yuav tos kom lub network khau raj. Koj tuaj yeem kaw qhov no tab sis nws tsis muaj qhov cuam tshuam vim peb siv APIPA chaw nyob hauv cmdline.txt. Yog tias koj xav kom nws khau raj sai dua, koj yuav tsum tshem qhov chaw nyob APIPA tab sis tom qab ntawd koj yuav tsum tau txuas koj tus Pi mus rau tus saib thaum koj tsis tuaj yeem txuas rau wifi yog tias muaj teeb meem.
Kauj Ruam 9: Cov lus qhia
Ntaus tus IP-chaw nyob ntawm th Pi hauv koj tus browser. Tsis txhob hnov qab ntxiv: 5000 rau tus IP-chaw nyob.
Thaum koj tuaj txog ntawm qhov chaw, tsuas yog pib ua si tshiab thiab sau cov npe ntawm cov neeg ua si.
Thaum qhov kev ua si pib, koj yuav tsum tos 5 vib nas this kom txog thaum ob lub cuab yeej txuas nrog.
Txhawm rau qhia tus taw tes tig, npog lub teeb pom kev zoo. Tom qab tus pointer nres tig, qhov txav tshwm ntawm qhov screen.
Yog tias ib tus neeg poob lossis tsis tuaj yeem ua lawv txoj haujlwm, lawv poob thiab koj yuav tsum thawb lawv lub npe ntawm qhov screen.
Tus neeg uas ua ntawv kawg sawv yeej.
Koj tuaj yeem pom txhua tus neeg uas yeej yav dhau los hauv daim ntawv keeb kwm.
Muaj kev lom zem!
Pom zoo:
Kev Sib Tham Sib Tham Punching Hnab: 3 Cov Kauj Ruam (nrog Duab)
Interactive Reflex Punching Bag: Cov lus qhia no yog rau txhua tus neeg uas xav txhim kho lawv cov kev txawj ntse thiab kev txawj ntaus nrig thaum tau txais kev paub ntau dua, siv Arduino, LED's thiab MK 2125 Accelerometer
SASSIE: Cov Txheej Txheem rau Kev Txaus Siab Tsis Txaus Siab thiab Kev Sib Tham Sib Tham: 5 Cov Kauj Ruam
SASSIE: Cov Txheej Txheem rau Kev Txom Nyem Tsis Txaus Siab thiab Kev Sib Tham Sib Tham: SASSIE yog lo lus teb rau lo lus nug peb txhua tus tau nug peb tus kheej thaum muaj kev ntsiag to txawv ntawm ib qho hauv peb lub neej, "Kuv puas yuav tham tom ntej?" Zoo tam sim no koj tsis tas yuav txhawj xeeb vim tias SASSIE tau tsim tshwj xeeb los lees paub qhov txawv txav uas ntsiag to
THIAB LUB NEEJ !! (Sib tham sib tham rooj sib tham): 4 Kauj Ruam
THIAB LUB NEEJ !! (sib tham sib tham txog Thruth Table): Nyob zoo cov phooj ywg, Kuv vam tias koj txhua tus nyob hauv koj lub tsev zoo thiab xav tsis thoob dab tsi ntawm cov ntaub ntawv uas muaj ?? Nkag siab cov rooj vag logic yog qhov tseem ceeb heev rau ob leeg
Qhov Sib Txawv Ntawm Lub Rooj Sib Tham Lub Rooj Sib Tham Lub Hwj Huam!: 6 Kauj Ruam (nrog Duab)
Qhov Sib Txawv Ntawm Lub Rooj Sib Tham Bench Power Supply!: Koj puas tau tsim koj qhov haujlwm tshiab thiab tuav rov qab los ntawm qhov koj tsis muaj kev tswj hwm koj li peev txheej? Zoo, qhov no yog qhov haujlwm rau koj! Hnub no kuv yuav qhia koj yuav ua li cas thiaj tsim tau lub rooj zaum hauv lub rooj zaum ua haujlwm tau zoo rau qhov pheej yig heev! Kuv tau ua qhov no tag nrho
Cov Neeg Siv Yooj Yim Sib Tham Sib Tham rau Kev Qhia thiab Kev Ntsuam Xyuas: 11 Kauj Ruam
Cov Neeg Siv Yooj Yim Sib Tham Sib Tham rau Kev Qhia thiab Kev Ntsuam Xyuas: Txoj haujlwm no tau tsim los ua ib feem ntawm chav kawm hauv tsev kawm qib siab, lub hom phiaj yog ua kom muaj kev sib tham sib tham los qhia thiab ntsuas qee yam ncauj lus. Rau nws peb tau siv Kev Ua Haujlwm ntawm PC rau lub interface thiab Arduino NANO rau lub khawm arcade thiab LEDs, yog li