Cov txheej txheem:

CocktailMaker: 4 Kauj Ruam
CocktailMaker: 4 Kauj Ruam

Video: CocktailMaker: 4 Kauj Ruam

Video: CocktailMaker: 4 Kauj Ruam
Video: Ruam Tsab Ntse Pluag Tsab Muaj Daim 4 2024, Kaum ib hlis
Anonim
CocktailMaker
CocktailMaker

CocktailMaker yog lub npe ntawm kuv txoj haujlwm, ua haujlwm tau raug txiav los ntawm lub npe.

Lub hom phiaj yog ua kom cov dej cawv uas koj xaiv ntawm tus kheej tsim lub vev xaib. Hauv lub vev xaib, koj tuaj yeem pom cov cocktails twg tuaj yeem ua tau, keeb kwm ntawm cov cocktails (muaj pes tsawg tus tau ua). Lub Tshuab Nws Tus Kheej tsim los ntawm lub twj tso kua mis uas koj tau xaiv rau ntawm qhov chaw. Qhov ntsuas qhov ntsuas kub, koj tuaj yeem pom ntawm cov zaub ntsuas kub hauv lub tshuab. Lub ntsuas hluav taws xob ultrasonic yog siv los kuaj xyuas yog tias muaj iav. Yog tsis muaj iav koj tsis tuaj yeem tsim cov dej cawv. Qhov ntsuas kawg yog lub zog ua kom pom kev tiv thaiv. Nws yuav siv los ntsuas cov kua hauv lub raj mis. Thaum muaj qhov ua yuam kev buzzer tawm thiab tus lej yuam kev yuav tshwm ntawm lub vijtsam.

Khoom siv

Microcontrollers

Raspberry Pi

Sensors & actuators

  • HCSR04 (Ultrasonic sensor)
  • Quab yuam squary resistor
  • DS18B20 (Kub sensor)
  • LCD20x4 -I2C (Zaub)
  • Twj tso kua mis (24V)
  • Buzzer (3V3)

Case

  • Crate dej haus
  • Plexiglass
  • Cov ntaub ntawv hlau (RPI, breadboards …)
  • Kua nplaum
  • Hlau

Kauj Ruam 1: Txhim Kho Raspberry Pi

Txhim kho Raspberry Pi
Txhim kho Raspberry Pi

Ua ntej peb tuaj yeem pib ntawm peb tes num, peb yuav tsum teeb tsa thiab teeb tsa peb Raspberry Pi.

  1. Nruab IMG. cov ntaub ntawv ntawm SD daim npav (16GB>).
  2. Txuas daim npav SD rau hauv Pi.
  3. Nruab Putty (SSH) thiab txuas nrog 169.254.10.1.

Tam sim no, peb pib npaj peb Raspberry Pi.

  1. Teeb tsa koj lub tsev network, siv cov lus txib no los teeb tsa nws ntawm koj Pi: wpa_passphrase "YourNetwork" "YourSSID" >> /etc/wpa_supplicant/wpa_supplicant.conf. Reboot koj Pi thiab ntaus ifconfig. Yog tias txhua yam zoo koj yuav pom tus IP ntxiv.
  2. Tom qab nws koj yuav tsum hloov koj tus password. Qhov txhua tus pi muaj tus password thiab tus username zoo ib yam thiab qhov ntawd ua rau nws yooj yim rau cov neeg nyiag nkag mus rau Pi. Koj tuaj yeem ua qhov ntawd los ntawm kev ntaus cov lus txib passwd.
  3. Nruab cov pob hauv qab no uas peb xav tau rau yav tom ntej: sudo apt install apache2 -y, sudo apt install php libapache2-mod-php -y, sudo apt install mariadb-server mariadb-client -y, sudo apt install php-mysql -y, sudo systemctl rov pib dua apache2.service, sudo apt nruab phpmyadmin -y.
  4. Tam sim no peb xav tau los teeb tsa cov tsev qiv ntawv. Peb siv pip3 hais kom ua: pip3 nruab mysql-txuas-sej, pip3 nruab flask-socketio, pip3 nruab flask-cors, pip3 nruab geventpip3 nruab gevent-websocket.
  5. Raws li cov kauj ruam kawg, peb teeb tsa peb Pi qhib rau ib lub xov hlau, spi thiab i2C. Siv cov lus txib hauv qab no txhawm rau nkag mus rau cov ntaub ntawv teeb tsa: sudo raspi-config.
  6. Thaum koj nyob hauv daim ntawv, txav mus rau Kev xaiv interface thiab nkag mus.
  7. Koj pom cov kev xaiv uas koj tuaj yeem ua tsis taus lossis ua haujlwm tau, Peb xav tau los pab ib leeg-xaim, spi thiab i2C.
  8. Rov pib dua

Kauj Ruam 2: Npaj Yam Khoom Npaj

Npaj Khoom
Npaj Khoom

Tam sim no txhua yam tau teeb tsa ntawm peb Raspberry Pi, peb txav mus rau hauv Circuit Court. Qhov kev xaiv zoo tshaj plaws los pib yog ua txhua yam ib kauj ruam zuj zus tab sis ua ntej peb yuav tsum teeb tsa peb li SSH kev sib txuas ntawm Visual Studio. Qhov txuas no piav qhia yuav ua li cas:

  1. Txuas tus Pi rau hauv Circuit Court.
  2. Muab cov ntsuas kub tso rau hauv Circuit Court.
  3. Kuaj qhov Circuit Court.
  4. Muab HC SR04 tso rau hauv Circuit.
  5. Kuaj qhov Circuit Court.

Kauj ruam 3: Database

Database
Database
Database
Database

Tom qab kuaj cov khoom peb yuav tsim cov ntaub ntawv khaws cia cov ntaub ntawv. Ua ntej peb yuav tsum tau txuas nrog SSH qhov txuas no qhia peb yuav ua li cas: https://dev.mysql.com/doc/workbench/en/wb-mysql-co…. Thaum koj txuas nrog koj tuaj yeem pib ua cov ntxhuav thiab ntxiv kab lossis koj tuaj yeem ntshuam cov ntaub ntawv los ntawm kev siv "Cov ntaub ntawv ntshuam". Cov ntaub ntawv ntawd suav nrog txhua cov ntaub ntawv thiab cov qauv.

Kauj ruam 4: Rooj plaub

Case
Case
Case
Case
Case
Case

Raws li cov kauj ruam kawg, koj yuav tsum ua kom koj cov khoom txaus nyiam. Kuv siv 3 kab txuas rau 12 qhov sib txuas hloov ntawm 36 xaim xaim thiab txhua yam raug khaws cia rau hauv ib lub thawv. Tom qab ntawd kuv tau siv lub raj mis haus thiab kuv tau txau nws nrog cov xim kom nws zoo li tshiab thiab tshiab.

Pom zoo: