Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Ua Case
- Kauj Ruam 2: Cov Khoom Siv Hluav Taws Xob
- Kauj Ruam 3: Teeb Kho Raspberry PI
- Kauj ruam 4: Rub tawm daim ntawv thov nws tus kheej
- Kauj ruam 5: Arduino
Video: Settlers of Raspi - Settlers of Catan Clone Nrog Electronics: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Cov lus qhia no yuav coj koj mus dhau cov kauj ruam ntawm kev tsim "Settlers of Raspi", Settlers of Catan game nrog cov khoom siv hluav taws xob thiab lub web interface.
Khoom siv
Hauv qab no yog cov khoom siv uas koj xav tau hauv orde kom ua raws phau ntawv qhia no.
Nco ntsoov tias qee cov kauj ruam tuaj yeem ua tiav sib txawv, zoo li siv lub khob cij tsis txhob siv qee qhov chaw.
Qhov no tsuas yog qhia koj txog cov txheej txheem thiab cov khoom siv uas kuv tau siv hauv kuv qhov kev tsim, xav tias yuav hloov pauv yam koj xav tau.
Kho vajtse
- Raspberry PI 3 B+
- Arduino UAS
- MCP23017 (x9)
- Khawm (x 144)
- 10k resistors (tsuas yog qee qhov)
- 220 resistors (x144)
- 330 resistors (x19)
- 2 x 16 LCD
- MFRC522 RFID-Nyeem Ntawv
- LDR
- Dawb Leds (x19)
- RGB Ledstrip (nquag cathode)
- 16-channel CD74HC4067
- Bi-directional Qib-hloov pauv
- 4 daim phiaj ntawm multiplex 8mm x 524mm x 454mm
- Ntau cov kab
- Tooj phaj
Kauj Ruam 1: Ua Case
Ua rooj plaub rau txoj haujlwm no yog peb thawj lub hom phiaj, qhov no yuav ua rau txhim kho kho vajtse yooj yim dua.
Lasercutting
Rub tawm 4 suav nrog. AI cov ntaub ntawv thiab coj lawv mus rau koj lub laser txiav-ze-khw nrog rau koj cov paib ntau tshaj.
Thiab tom qab ntawd lasercut cov phiaj nrog cov ntaub ntawv muab; p
Khaws txhua qhov uas raug txiav tawm, koj yuav xav tau lawv.
Muab tso ua ke
Rau lub rooj sib txoos, lo cov phaj raws li hauv qab no: Catan_Base> Catan_Base_Holed> Catan_Border_Tiles_Bottom> Catan_Border_Tiles_Top
Tos nrog ntxiv rooj plaub rau cov khoom siv hluav taws xob, raws li koj yuav xav tau qee qhov chaw ua haujlwm nrog ua ntej.
Cov vuas
Hmoov tsis zoo, ntu no tseem tsis tau tiav thiab yuav muab kho dua ib zaug
Cov vuas rau qhov kev ua si kuj tau txais los ntawm cov ntaub ntawv lasercutting (yeej-yeej txoj cai, vim qhov no tiv thaiv cov ntaub ntawv pov tseg).
Daim duab saum toj no qhia sab saum toj (sab laug) thiab hauv qab (sab xis) ib feem ntawm cov vuas.
Hauv 1 sab ntawm cov vuas, hollow tawm qee cov ntoo, yog li koj muaj qee qhov chaw tso khoom siv hluav taws xob.
Rau txhua ntawm cov vuas koj xav tau: 1 10k resistor, 1 resistor nyob rau hauv thaj tsam ntawm 18k txog 47k (txhua hom pobzeb xav tau qhov sib txawv resistor, 6 hom hla qhov no) thiab 1 dawb LED.
Tam sim no muab cov khoom siv hluav taws xob tso rau hauv (saib ntawm daim duab saum toj no).
Tsoo qhov kawg ntawm cov xov hluav taws xob hla lub qhov me me rau hauv qab-pobzeb (tsuas yog qhov qhov teeb meem yog: Qhov chaw nyob nruab nrab: anode ntawm LED, qhov ze rau qhov chaw nruab nrab qhov: cathode ntawm cov coj).
Tam sim no, txiav koj cov phaj tooj liab rau hauv daim me me 5x5mm, thiab muab lawv txuas rau cov hlua txuas tawm ntawm lub qhov nyob sab nrauv ntawm cov pobzeb hauv qab.
Kauj Ruam 2: Cov Khoom Siv Hluav Taws Xob
Wow, koj twb tau ua tiav qhov no lawm?
Cia peb ua nws nrog tom qab;)
Nqe lus no yooj yim piav qhia, tsuas yog ua raws cov txheej txheem suav nrog ntawm no.
Kauj Ruam 3: Teeb Kho Raspberry PI
Woohoo, tam sim no mus rau qhov lom zem! Teeb tsa raspberry pi: D
Txhim kho raspberry pi
Tsim cov duab
Ua ntej tshaj, koj yuav tsum rub ob qho ntawm cov ntawv txuas.
- Win32 Disk Imager
- Raspian OS
Tam sim no ua raws cov theem no:
- Ntxig koj daim npav micro-SD rau hauv koj lub computer
- Qhib Win32 Disk Imager
- Xaiv cov ntaub ntawv.img koj nyuam qhuav rub tawm
- Nyem 'sau'
Txhawm rau nkag mus rau pi, peb yuav xav tau ob peb kauj ruam ntxiv
- Mus rau SD-card's boot directory
- Tsim cov ntawv sau hu ua "ssh.txt"
- Rho tawm.txt ncua ntxiv
- Qhib cov ntaub ntawv "cmdline.txt"
- Thaum kawg ntawm cov ntawv, ntxiv ip = 169.254.10.1 (tab sis khaws qhov no ntawm kab tib yam li txhua lwm cov ntawv.
Teeb tsa pi
Txuas 1 kawg ntawm tus ethernet cable hauv koj lub pc thiab lwm qhov kawg hauv koj tus pi.
Tam sim no lub zog pi, tos 5 feeb kom ntseeg tau tias pi tau pib raug.
Qhib koj tus neeg siv SSH uas kuv nyiam (Kuv siv Putty) thiab txuas rau IP uas peb muab rau pi hauv cov theem saum toj no.
Default username thiab password yog "pi" thiab "raspberry".
Hauv raspi-teeb tsa, pab kom I2C.
Tau txais pi ntawm wifi
Txhawm rau kom tau txais koj cov raspberry pi ntawm koj lub wifi, ntaus hauv qab cov lus txib:
sudo -iwpa_passphrase "mySSID" "myPASSWORD" >> /etc/wpa_supplicant/wpa_supplicant.conf wpa_cli interface wlan0 reconfigure
Tsis txhob hnov qab hloov "mySSID" thiab "myPASSWORD" nrog SSID thiab PASSWORD ntawm koj lub router.
Rub tawm pob thiab sau ntawv
Peb yuav tsum tau teeb tsa qee pob khoom thiab cov ntawv sau txhawm rau kom ua tiav txoj haujlwm no thiab ua haujlwm tau zoo, yog li thov sau cov lus txib hauv qab no:
sudo apt nruab mariadb-server
sudo apt install apache2 -y pip install Flask Flask-Cors Flask-MySQL Flask-SocketIO PyMySQL
Teeb lub Database
Txhawm rau kom peb siv txoj haujlwm kom nws muaj peev xwm tag nrho, peb yuav xav tau los teeb tsa peb cov database! Yog li cia peb ua qhov quav!
mysql_secure_installation
Thaum nws nug txog peb tus password, tsuas yog nias nkag, raws li peb tseem tsis tau tsim ib tus neeg siv.
Tom ntej no nws yuav nug peb yog tias peb xav tau tus lej zais hauv paus, xaiv yog, thiab nkag mus rau tus password uas xav tau.
Xaiv yog rau tag nrho cov lus nug ntxiv.
sudo -i ua
mysql pab txhua qhov priveleges ntawm rpiUser.* rau ''@'%' txheeb xyuas los ntawm ''; FLUSH PRIVELEGES
nco ntsoov tias koj tsim tus neeg siv hu ua rpiUser nrog tus password omgThisIsSoSecret
Kauj ruam 4: Rub tawm daim ntawv thov nws tus kheej
Peb nyob ze, tsuas yog dai nrog kuv me ntsis ntxiv!
Ua raws qee cov lus txib (ib zaug ntxiv):
cd /home /pib
git clone https://github.com/StevenCopermans/Settlers-of-Ra … SettlersOfRaspicd SettlersOfRaspi sudo cp -R Website//var/www/html/sudo cp -R SettlersOfRaspi//home/pi/SettlersOfRaspi sudo mysql -u hauv paus -p << DATABASE.sql sudo nano /etc/rc.local
Qhov kawg ntawm cov ntawv uas nyuam qhuav qhib, ua ntej tawm, ntxiv kab hauv qab no:
python3 /home/pi/SettlersOfRaspi/app.py $
Tom qab ntawd nias ctrl + X> y> nkag
Kauj ruam 5: Arduino
Kauj ruam kawg! Wooo
Rub tawm daim ntawv Arduino
Qhib cov ntawv tais ceev tseg hauv qhov program arduino, thiab xa cov ntawv!
Qhov ntawd yog nws! Peb ua tiav!
Txaus siab rau qhov kev ua si!: D
Pom zoo:
Mega RasPi - Raspberry Pi hauv Sega Mega Drive / Chiv Keeb: 13 Kauj Ruam (nrog Duab)
Mega RasPi - Raspberry Pi hauv Sega Mega Drive / Chiv Keeb: Phau ntawv qhia no coj koj los ntawm kev hloov pauv ntawm Sega Mega Drive qub rau lub khoos phis tawj retro, siv Raspberry Pi.Kuv tau siv sijhawm ntau teev ntawm kuv thaum yau ua yeeb yaj kiab game Kuv Sega Mega Drive. Kuv cov phooj ywg feem ntau muaj ib yam nkaus, yog li peb yuav
Qhov kawg Electronics Pab -- Hloov pauv Lub Rooj Sab Laj Sab saum toj PSU Nrog Pab Tes: 12 Kauj Ruam (nrog Duab)
Qhov kawg Electronics Pab || Hloov Pauv Lub Rooj Sab Laj PSU Nrog Pab Tes: Thaum ua haujlwm nrog hluav taws xob ob lub cuab yeej zoo nkauj npaum li xav tau. Hnub no peb yuav tsim ob qhov tseem ceeb no. Thiab peb tseem yuav coj nws ib kauj ruam ntxiv thiab koom ua ke ob qho no ua ke rau hauv qhov kev pab cuam hluav taws xob zoo tshaj plaws! Kuv tau tham nrog
RasPi Ob-Player Arcade Coffee Table: 7 Cov Kauj Ruam (nrog Duab)
RasPi Ob-Player Arcade Coffee Table: Nov yog kuv qhov version ntawm Raspberry Pi arcade kas fes rooj. Kuv tau txais lub tswv yim los ntawm lwm cov lus qhia zoo nyob ntawm no thiab xav qhia kuv qhov kev paub nrog kev tsim.Qhov rooj tuaj yeem ua si game los ntawm ntau qhov game game eras suav nrog NES, SNES, Sega, Play
Settler's of Catan - Ceev Settler Tsuav: 4 Cov Kauj Ruam
Settler's of Catan - Speedy Settler Tsuav: Kuv tau ua cov cuab yeej no los sim thiab txhawb kom cov neeg ua si kom luv lawv tig thiab ua kom qhov kev ua si nrawm dua. Txhua lub sijhawm koj nias lub pob nws tsim cov dice tshiab yob thiab pib lub sijhawm tus neeg ua si tom ntej tig. Nws taug qab txhua tus neeg ua si lub sijhawm sib sau ua ke
Tsiaj Feeder Tshuab Nrog RasPi thiab Telegram Bot: 4 Cov Kauj Ruam (nrog Duab)
Tsiaj Feeder Tshuab Nrog RasPi thiab Telegram Bot: Ua ntej tshaj plaws kuv yuav tsum tau hais meej tias qhov no tsis yog thawj lub tswv yim Mine, tsuas yog hloov kho thiab hloov kho cov ntawv sau ua haujlwm kom ua haujlwm nrog xov tooj, Kuv pom nws hauv cov lus qhia yav dhau los yog li cov qhab nia tiag tiag yog sau ntawm nws.Koj tuaj yeem pom cov lus Mev