Cov txheej txheem:

WebFoos - Smart Foosball Table: 6 Kauj Ruam
WebFoos - Smart Foosball Table: 6 Kauj Ruam

Video: WebFoos - Smart Foosball Table: 6 Kauj Ruam

Video: WebFoos - Smart Foosball Table: 6 Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Hlis ntuj nqeg
Anonim
WebFoos - Smart Foosball Table
WebFoos - Smart Foosball Table

Txog kuv qhov phiaj xwm tsev kawm ntawv hauv kuv thawj xyoo ntawm Howest, Kuv txiav txim siab los ua lub rooj Foosball ntse. Lub rooj sau npe cov hom phiaj thiab txuag kev ua si sib tw, txheeb cais cov qhab nia thiab cov neeg siv/pab pawg txheeb cais rau hauv online lub vev xaib.

Kauj Ruam 1: Qhov Chaw

Txhawm rau tsim koj tus kheej lub rooj foosball ntse, koj yuav xav tau cov hauv qab no (lossis zoo sib xws) ntu:

1 x A Raspberry Pi 3 Qauv B (€ 39, 90)

  • 2 x HC-sr04 Ultrasonic Sensor (€ 2, 79 txhua)
  • 1 x RFC522 RFID Sensor (€ 11, 90)
  • 1 x LCD Screen (€ 13, 90)
  • 1 x PVC Piping 50mm (€ 2, 49)
  • 8 x PVC Piping 50mm Kaum (€ 1, 59 txhua)
  • 2 x PVC Piping 50mm T (€ 3, 39 txhua)

Ob peb ntawm cov kab txuas sib txuas (€ 4, 95)

Kwv yees Tus Nqi Kwv yees: € 123, 17

Cov nqi yuav txawv ntawm tus neeg muag khoom mus rau tus muag khoom tab sis cov no yog tus nqi kwv yees uas kuv tau txais kuv cov khoom rau.

Kauj Ruam 2: Cov Sensors: Circuitry

Sensors: Circuitry
Sensors: Circuitry

Txhawm rau txuas lub ntsuas hluav taws xob rau Raspberry Pi, ua raws cov txheej txheem fritzing saum toj no siv cov txuas txuas.

Tus tiv thaiv txuas nrog V0 tus pin ntawm lub vijtsam LCD tuaj yeem hloov los ntawm lub zog ntsuas kom koj tuaj yeem kho qhov sib txawv ntawm lub vijtsam LCD. Cias txuas ob sab sab nraud ntawm lub hwj chim rau hauv av thiab te 5V, tom qab ntawd txuas tus pin nruab nrab rau V0.

Xyuas kom tseeb tias txhua yam ntawm koj cov cables ntev txaus kom koj tuaj yeem tso txhua yam ntawm koj lub ntsuas kom raug rau/sab hauv lub rooj (saib cov theem hauv qab no).

Kauj Ruam 3: Cov Sensors: HC-RS04

Cov Sensors: HC-RS04
Cov Sensors: HC-RS04
Cov Sensors: HC-RS04
Cov Sensors: HC-RS04
Cov Sensors: HC-RS04
Cov Sensors: HC-RS04

Ua ntej peb tuaj yeem tso HC-SR04 rau hauv nws qhov chaw raug, peb yuav tsum muab cov khoom PVC sib dhos ua ob lub raj zoo sib xws los ua lub pob los ntawm te lub hom phiaj dhau los HC-SR04:

  1. Txuas 2 ntawm 45 ° kaum khoom mus rau 1 ntawm T-puab PVC txuas (daim duab 1)
  2. HC-SR04 haum zoo nyob hauv ib feem uas tawm mus (daim duab thib ob)
  3. Siv 2 lwm 45 ° txuas txuas ntxiv ua lub pob rau qhov uas koj xav kom nws ua (daim duab thib 3)
  4. Laum ib lub qhov hauv qab ntawm lub hom phiaj, uas tam sim no lub pob tuaj yeem poob rau hauv cov yeeb nkab
  5. Txiav tawm ib feem ntawm PVC lub raj ntev, koj tuaj yeem siv ntu no los txhawb cov yeeb nkab uas koj tau ua
  6. Muab cov yeeb nkab tso rau saum rooj zoo li daim duab thib 3 (Nco ntsoov tias koj tsis txhob hnov qab txuas koj li HC-SR04 rau Raspberry Pi ua ntej !!!)

Rov ua cov kauj ruam saum toj no rau HC-SR04 thib ob

Kauj Ruam 4: Cov Sensors: RSC522

Cov Sensors: RSC522
Cov Sensors: RSC522

RSC522 RFID Sensor tuaj yeem ua rau sab hauv ntawm phab ntsa ib sab ntawm ib lub hom phiaj. Ntoo yog nyias txaus kom koj tuaj yeem luam theej duab koj daim npav hla ntoo.

Kauj Ruam 5: Cov Sensors: LCD Screen

Cov Sensors: LCD Screen
Cov Sensors: LCD Screen

Txhawm rau teeb tsa lub vijtsam LCD nyob rau sab saum toj ntawm lub rooj, Kuv tsuas yog drilled qee qhov rau cov xaim hluav taws xob kom haum los ntawm te saum lub rooj, tom qab ntawd glued LCD rau lub rooj nws tus kheej.

Kauj ruam 6: Pib

Txog qhov haujlwm no, Kuv xav tias koj twb muaj cov duab ua haujlwm debian teeb tsa ntawm koj li Raspberry Pi. Yog tias tsis yog, koj tuaj yeem pom cov lus qhia yooj yim ntawm cov nom raspberry pi lub vev xaib.

Yog tias koj tau ua tiav txhim kho Raspbian, fenter cov lus txib hauv qab no ntawm koj Pi:

  1. Nruab Pob:

    1. sudo apt hloov tshiab
    2. sudo apt install -y python3-venv python3-pip python3-mysqldb mariadb-server uwsgi nginx uwsgi-plugin-python3
  2. Tsim ib puag ncig virtual:

    1. python3 -m pip nruab -hloov kho pip setuptools log virtualenv
    2. mkdir project1 && cd project1
    3. python3 -m venv-system-site-packages env
    4. qhov chaw env/bin/qhib
    5. nab hab sej -m pip nruab mysql-connector-python argon2-cffi Flask Flask-HTTPAuth Flask-MySQL mysql-connector-python passlib
  3. Ua Database:

    1. sudo mariadb
    2. CREATE USER 'project1-admin'@'localhost' IDENTIFIED BY 'sdfgh'; Tsim tus neeg siv 'project1-web'@'localhost' IDENTIFIED BY 'sdfgh'; Tsim tus neeg siv 'project1-sensor'@'localhost' IDENTIFIED BY 'sdfgh';

      CREATE DATABASE project1;

      ZOO TSHAJ PLAWS YOOJ YIM RAU project1.* Rau 'project1-admin'@'localhost' NROG QHOV ZOO TSHAJ PLAWS; GRANT SELECT, INSERT, Hloov tshiab, Rho tawm ntawm qhov project1.* TO 'project1-web'@'localhost'; GRANT SELECT, INSERT, Hloov tshiab, Rho tawm ntawm qhov project1.* TO 'project1-sensor'@'localhost'; NTSEEG NTAWV QHOV TSEEB;

    3. Khiav cov ntaub ntawv sql hauv project1/sql
  4. Rub tawm cov cai:

    1. git clone
    2. sed -i s/pi/$ USER/g conf/(! hloov pi hauv cov ntaub ntawv teeb tsa rau koj tus kheej lub npe)
  5. Teeb nginx:

    1. sudo cp conf/nginx/etc/nginx/sites-available/project1
    2. sudo rm/etc/nginx/sites-enabled/default
    3. sudo ln -s/etc/nginx/sites-available/project1/etc/nginx/sites-enabled/project1
    4. sudo systemctl rov pib dua nginx.service
  6. Khiav cov cai:

    sudo systemctl qhib qhov project1-*

Pom zoo: