Cov txheej txheem:

Capture Box: 8 Kauj Ruam
Capture Box: 8 Kauj Ruam

Video: Capture Box: 8 Kauj Ruam

Video: Capture Box: 8 Kauj Ruam
Video: ClonerAlliance Box Pro ULTIMATE CAPTURE BOX Perfect for Streamers CONVERT RECORDINGS TO DIGITAL 2024, Hlis ntuj nqeg
Anonim
Capture Lub thawv
Capture Lub thawv
Capture Lub thawv
Capture Lub thawv

Capture The Box yog kev sib tw ua pab pawg uas koj tuaj yeem ua si nrog phooj ywg hauv koj thaj chaw.

Lub hom phiaj yog txhawm rau ntes lub npov thiab khaws nws hauv koj lub siab kom ntev li ntev tau thaum lwm tus neeg ua si sim mus thiab nyiag nws kom deb ntawm koj lub sam thiaj lossis pem hauv ntej vaj.

Qhov kev ua si no siv GPS txhawm rau nrhiav lub npov thiab cim npe RFID txhawm rau txheeb xyuas cov neeg ua si. Ib qho kev xaiv LDR tuaj yeem ntxiv kom haum qhov kev siv ntawm dot matrix zaub nrog qhov feem pua ntawm lub teeb nyob hauv cheeb tsam.

Khoom siv

Microcontrollers thiab computer

  • Raspberry Pi
  • Arduino (Mega) Kuv xaiv Arduino Mega hla qhov Uno ib txwm, vim tias nws muaj ntau tus pin. Qhov no yog qhov tsim nyog vim tias peb tab tom siv daim npog Dragino LoRa, uas yuav ua rau peb tsis muaj tus lej digital tsawg dhau thaum siv UNO. TSWV YIM: Nws yog qhov zoo tshaj los siv qhov tseeb, vim tias Suav cov pob zeb tsis ua haujlwm ib txwm ua.

Sensors thiab modules

  • 4 MAX7219 Dot Matrix Modules Txuas DOUT rau DIN, CS rau CS, CLK rau CLK …
  • Lub Teeb Ntsuas Tus Kheej (10K) + Resistor (10K)
  • NEO-7M (lossis zoo sib xws) GPS Module Kuv tab tom siv VMA430 los ntawm Velleman
  • RC522 RFID Module+ qee qhov cim npe/daim npav RFID

Rau siv LoRa (thev naus laus zis wireless)

Dragino Lora ntaub thaiv npog

Yeem sensors thiab modules

Ib qho LCD tso saib kom pom IP chaw nyob ntawm Raspberry Pi

Rau kev teeb tsa kev xeem

Ib lub khob cij thiab Dupont Cables (Txiv neej-Txiv neej

Yeem (casing)

  • Soldering hlau
  • Cov ntaub ntawv qub
  • Cov ntaub ntawv rau 3D luam ntawv
  • Qee cov ntoo ntoo nyias
  • Qee cov ntsia liaj qhov rooj thiab cov txiv ntoo (uas tuaj yeem haum rau hauv Arduino qhov). Kuv cov ntsia hlau muaj txoj kab uas hla ntawm 3 hli.

Tus nqi kwv yees tuaj yeem pom hauv BOM (Cov Nqi Ntawm Cov Khoom), suav nrog hauv qab no.

Kauj Ruam 1: Teeb tsa Raspberry Pi

Raspberry Pi yog lub plawv ntawm Txoj Haujlwm.

Nws yuav ua rau lub frontend, backend thiab database. Nws tseem yuav yog lub luag haujlwm rau kev sib txuas lus ntawm tus backend thiab Arduino.

Txhawm rau kom peb siv Raspberry Pi, peb yuav tsum ua cov hauv qab no:

Ntu 1: Nruab Raspbian ntawm Raspberry Pi

Cov lus qhia yuav ua li cas thiaj tuaj yeem pom ntawm no:

Ntu 2: Nruab Raspbian ntawm Raspberry Pi teeb tsa koj li WiFi hauv tsev.

Qhov no tuaj yeem ua tiav siv wpa_passphrase "YourNetwork" "YourSSID" >> /etc/wpa_supplicant/wpa_supplicant.conf

Reboot Pi thiab koj yuav tsum pom tus IP chaw nyob thaum ntaus hauv ifconfig

Ntu 3: Txhim kho lub vev xaib thiab chaw khaws ntaub ntawv

Thaum koj muaj koj li Pi thiab khiav, nws yog qhov zoo tshaj los hloov koj tus password qhov no tuaj yeem ua tiav nrog cov lus txib passwd.

Thaum qhov no ua tiav, mus tom ntej thiab teeb tsa Apache, PHP, MariaDB thiab PHPMyAdmin.

Apache, PHP sudo apt nruab apache2 -y sudo apt nruab php libapache2 -mod -php -y

MariaDB sudo apt nruab mariadb-server mariadb-client -y sudo apt nruab php-mysql -y sudo systemctl rov pib dua apache2.service

PHPMyAdminsudo apt nruab phpmyadmin -y

Tsis txhob hnov qab teeb tsa tus password MySQL ruaj ntseg.

Ntu 4: Txhim kho cov tsev qiv ntawv Python tsim nyog

Rau cov backend, peb yuav xav tau qee lub tsev qiv ntawv. Cov no tuaj yeem teeb tsa siv cov lus txib pip3.

pip3 nruab mysql-connector-python

pip3 nruab flask-socketio

pip3 nruab flask-cors

pip3 nruab geventpip3 nruab gevent-websocket

pip3 nruab ttn

Kauj Ruam 2: Tso Tawm Cov Khoom Siv Hluav Taws Xob

Tso Tawm Cov Khoom Siv Hluav Taws Xob
Tso Tawm Cov Khoom Siv Hluav Taws Xob
Tshaj Tawm Cov Khoom Siv Hluav Taws Xob
Tshaj Tawm Cov Khoom Siv Hluav Taws Xob

Txhawm rau kom Txoj Haujlwm no ua haujlwm, peb yuav tsum txuas tag nrho cov khoom siv hluav taws xob.

Cov ntaub thaiv npog LoRa tuaj yeem tso tau yooj yim. Tsuas yog ua tus pin nrog tus pin ntawm koj Arduino.

Lwm qhov kev sib txuas tau piav qhia hauv kuv cov phiaj xwm Fritzing. Uas tuaj yeem rub tawm ntawm no:

Kauj Ruam 3: Tsim Tus Database

Tsim Database
Tsim Database

Yuav kom khaws tau txhua qhov kev ua si thiab cov ntaub ntawv ntsuas, kuv tau ua ob peb lub rooj:

Kev ntsuas los ntawm cov ntsuas pom, pom hauv cov ntxaij sensor. Nws muaj qhov siv rau lub ntsuas, tus nqi ntawm kev ntsuas (piv txwv li coördinates: 51.123456; 3.123456) thiab xaiv tus lej game (yog tias muaj kev ua si thaum lub sijhawm ntsuas).

Cov npe neeg uas ua ntawv thiab UID ntawm lawv daim npav cim npe RFID. Xaiv tus neeg saib xyuas thaj tsam ntxiv, tus neeg no tuaj yeem hloov kho qhov kev ua si (piv txwv li tso tseg nws ua ntej lub sijhawm).

Cov ntaub ntawv game (pib thiab sijhawm kawg).

spel_has_speler Kev sib raug zoo ntawm spel thiab speler. Nov yog qhov chaw uas cov players tau muab tso rau hauv qhov kev ua si.

bezit Hauv cov lus no, cov qhab nia tau txais kev cawmdim. Nws suav nrog tus lej game, tus lej player, lub sijhawm nws nyiag lub thawv thiab lub sijhawm nws poob nws (thaum lwm tus nyiag nws lossis thaum qhov kev ua si xaus). Los ntawm kev rho tawm lub sijhawm pib los ntawm lub sijhawm kawg, koj tuaj yeem xam cov qhab nia nws tau txais los ntawm kev ntes ntawd.

Kev xa tawm ntawm cov ntaub ntawv tuaj yeem pom ntawm kuv GitHub (https://github.com/BoussonKarel/CaptureTheBox)

Qhib sql hauv PHPMyAdmin / MySQL Workbench thiab khiav nws. Tam sim no lub database yuav tsum tau ntshuam.

Kauj Ruam 4: Teeb Tus lej ntawm TTN

Kauj Ruam 1: Sau npe rau tus as khauj ntawm TTN thiab tsim daim ntawv thov

Sau npe rau tus as khauj ntawm TheThingsNetwork, tom qab ntawd mus rau Console> Ntxiv daim ntawv thov.

Xaiv lub npe rau koj daim ntawv thov thiab nyem Ntxiv daim ntawv thov.

Kauj ruam 2: Sau npe lub cuab yeej

Thaum koj tau ua koj daim ntawv thov, mus rau npe ntaus ntawv.

Xaiv tus lej ntaus ntawv, qhov no tuaj yeem yog txhua yam koj xav tau (tsuav yog nws yog nab nab) thiab nyem rau npe.

Nyem rau ntawm Generate icon hauv Device EUI, yog li TTN yuav tsim ib qho rau koj.

Kauj Ruam 3: Sau koj li ntawv pov thawj

Tam sim no mus rau koj lub cuab yeej thiab nyem rau ntawm lub cim cim nyob ib sab ntawm Device EUI, App EUI thiab App yuam sij. Tam sim no nws yuav tsum tshwm sim raws li kab ntawm bytes.

Ua ntej koj luam, nyem khawm Hloov thiab xyuas kom tseeb tias koj Dev EUI thiab App EUI yog LSB Thawj.

Koj li App Key yuav tsum nyob MSB FIRST (tsis txhob hloov qhov ntawd).

Koj yuav xav tau cov yuam sij no hauv cov kauj ruam tom ntej: Teeb tsa Arduino.

Kauj Ruam 4: Sau koj li Ntawv Thov Kev Nkag Nkag

Tam sim no peb yuav xav tau ib tus yuam sij ntxiv los teeb tsa MQTT ntawm peb Raspberry Pi.

Mus rau koj Daim Ntawv Thov thiab nqes mus rau Acces Keys.

Koj yuav xav tau qhov no hauv Backend kauj ruam.

Kauj Ruam 5: Teeb tsa Arduino

Arduino code kuj tseem tuaj yeem pom ntawm kuv GitHub, hauv qab Arduino (https://github.com/BoussonKarel/CaptureTheBox)

Txoj cai no tau muab faib ua ntau pawg tab, kom ua kom nws muaj kev sib koom ua ke.

main.inoQhov tseem ceeb code: tshaj tawm tus pin, teeb tsa () thiab voj ()

0_LoRa.inoTus lej no ua haujlwm sib txuas lus siv LoRa.

Nws muab cov ntaub ntawv ntawm LDR, GPS thiab RFID cim npe rau hauv kab ntawm 13 bytes thiab xa qhov no mus rau TheThingsNetwork.

1_LDR.inoUsing analogRead (), nws ntsuas qhov ntsuas hluav taws xob ntau dua li Lub Teeb Ntsuas Tus Kheej.

Qhov no tau hloov pauv mus rau feem pua ntawm lub teeb (0 tsis muaj dab tsi, 100 yog lub teeb nyem ntawm lub xov tooj ntawm tes).

2_GPS.inoThis siv Serial kev sib txuas lus siv TX1 thiab RX1 (Serial1).

Nws siv NMEA cov lus ($ GPRMC cov lus kom raug) kom pom qhov nruab nrab thiab qhov ntev ntawm lub npov.

3_RFID.inoUa siv MFRC522 lub tsev qiv ntawv, tus lej no ntsuas rau daim npav RFID tshiab.

4_DotMatrix.inoTxoj cai no yog siv thawj zaug thiab teeb tsa cov cim teev teev teev teev.

Teeb nws

Ua ntej koj tuaj yeem xa cov cai no rau koj Arduino, koj yuav tsum tau teeb tsa ob peb lub tsev qiv ntawv.

Lub tsev qiv ntawv Arduino-LMIC los ntawm matthijskooijman (https://github.com/matthijskooijman/arduino-lmic)

MFRC522 lub tsev qiv ntawv rau tus nyeem RFID (https://github.com/miguelbalboa/rfid)

Tam sim no, mus rau main.ino thiab hloov DEVEUI, APPEUI thiab APPKEY rau qhov koj tau theej cov kauj ruam kawg.

Kauj Ruam 6: Teeb Up Backend

Backend rau Txoj Haujlwm no tuaj yeem pom ntawm kuv GitHub, hauv RPI> Backend (https://github.com/BoussonKarel/CaptureTheBox).

Nws ua haujlwm li cas?

  1. Txhua txhua 10 vib nas this, txoj cai saib rau kev ua si nquag.
  2. Yog tias hom tau teeb tsa rau Serial, ib txoj hlua siv ntawm Arduino thiab Pi. Pi pov npav rau qhov tseem ceeb ntawm LDR thiab GPS. Arduino teb nrog hom JSON. RFID cim npe raug xa thaum twg lawv tau nthuav tawm.
  3. Yog tias hom tau teeb tsa rau LoRa, MQTT tus neeg siv khoom tau tsim uas ua rau muaj kev hu rov qab thaum twg LoRa cov ntaub ntawv tau txais los ntawm TTN. Qhov no muaj cov ntaub ntawv LDR, GPS thiab RFID.
  4. Lub ntsej muag tuaj yeem khaws cov ntaub ntawv siv API qhov kawg. Feem ntau ntawm cov ntaub ntawv tau rov los siv huidigSpel.id. Data tau xa rov qab hauv JSON hom siv jsonify ()

Hloov kho qhov chaw mus rau secrets.py thiab sau lub npe ntawm koj daim ntawv thov LoRa thiab koj tus lej nkag (koj tau sau ua ntej).

Mus rau config.py thiab sau koj li ntaub ntawv pov thawj Database (xws li tus password, tus siv…)

Teeb nws li kev pabcuamTxhua kom khiav app.py, thaum koj tau lees tias qhov no ua haujlwm, peb tuaj yeem siv nws los ua qhov kev pabcuam Qhov no yuav cia li pib tus lej hauv keeb kwm yav dhau thaum koj khau raj koj li pi.

Txhawm rau ua daim ntawv no ctb_service.service rau /etc/systemd/system/ctb_service.service. sudo cp ctb_service.service /etc/systemd/system/ctb_service.service

Tam sim no pab nws siv systemctl pab kom ctb_service.service

Yog tias koj yuav tsum tau hloov qee qhov chaws, koj tuaj yeem yooj yim nres nws siv systemctl nres (qhov no yuav pib dua thaum rov pib dua) lossis xiam oob qhab yog (nres nws los ntawm kev pib pib) siv systemctl xiam.

Yog tias koj xav tau sab laj cov cav (vim qhov ua yuam kev), koj tuaj yeem siv journalctl -u ctb_service.service.

Xav paub ntau ntxiv txog cov kev pabcuam tuaj yeem nrhiav tau ntawm no:

Kauj Ruam 7: Teeb tsa lub Frontend

Raws li ib txwm muaj, tuaj yeem nrhiav pom ntawm kuv GitHub, hauv qab RPI> Frontend (https://github.com/BoussonKarel/CaptureTheBox)

Muab qhov no tso rau hauv /var /html nplaub tshev ntawm koj li Raspberry Pi.

Qhov no muaj tag nrho cov nplooj ntawv web tsim nyog rau qhov kev ua si.

Nws kuj tseem muaj cov ntawv los tham nrog lub backend (ob lub sijhawm tiag tiag thiab siv API qhov kawg).

Kauj Ruam 8: Ntxiv Casing

Ntxiv Casing
Ntxiv Casing
Ntxiv Casing
Ntxiv Casing

Rau rooj plaub, Kuv siv cov cuab yeej qub, ua ke nrog cov ntaub ntawv/txheej txheem hauv qab no:

  • 3D luam ntawv
  • Npuas ua kom lub roj teeb nyob hauv qhov chaw
  • Recycled ntoo ntoo
  • Kub kua nplaum
  • Screws thiab ceev

Koj ua dab tsi nrog koj rooj plaub yog koj xaiv! Kuv yuav muab txoj kev ywj pheej rau koj.

Txog kev tshoov siab, Kuv tau ntxiv qee daim duab ntawm kuv (ua tiav) rooj plaub.

Pom zoo: