Cov txheej txheem:

Kuv Thawj Daim iav Ntse: 8 Kauj Ruam
Kuv Thawj Daim iav Ntse: 8 Kauj Ruam

Video: Kuv Thawj Daim iav Ntse: 8 Kauj Ruam

Video: Kuv Thawj Daim iav Ntse: 8 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Hlis ntuj nqeg
Anonim
Kuv Thawj Daim iav Ntse
Kuv Thawj Daim iav Ntse

Peb txhua tus paub qhov teeb meem no, peb sawv ntxov lig dhau lawm, yog li peb yuav tsum tau npaj sai heev. Qhov ntawd txhais tau tias koj tsis muaj sijhawm los saib seb huab cua zoo li cas. Tab sis dab tsi koj yeej muaj sijhawm rau saib hauv daim iav. Yuav ua li cas yog tias peb tuaj yeem ua ke ob? Hauv qhov haujlwm no kuv yuav ua Daim iav Ntse uas koj yuav tuaj yeem pom huab cua hauv cheeb tsam, ntsuas kub hauv chav, huab cua nyob hauv chav thiab muaj teeb pom kev ntau npaum li cas. Koj yuav tuaj yeem saib tag nrho cov ntaub ntawv ntsuas hauv lub vev xaib tus kheej.

Kauj Ruam 1: Koj Puas Xav Tau Cov Khoom Siv?

Hauv qab no koj tuaj yeem pom cov khoom tsim nyog uas xav tau los ua kom tiav txoj haujlwm no.

• LCD Saib nrog HMDI cov tswv yim

• Raspberry Pi 3B+

• SD Card

• HDMI cable

• Cov kab txuas txuas lub ntsuas pa rau koj lub txiv pos

• DHT11 Kub thiab Vaum Sensor

• TSL 2561 Lub Teeb Pom Kev Zoo

• IRFZ44N

• Ib qho pheej yig RGB Led Sawb

• Rwb thaiv tsev kom nyob nruab nrab ntawm lub vijtsam thiab lub plexiglass rau kev tiv thaiv

• Plexiglass (qhov loj me ntawm LCD Saib)

• Zaj duab xis qhov muag tsom iav

• Ntoo

• Kho vajtse txuas cov ntoo (cov ntsia hlau, kua nplaum, hlau nqes,..)

Tus nqi siab tshaj plaws ntawm txoj haujlwm no yuav yog € 270, 00 (Yog tias koj muaj pi thiab tsis muaj LCD saib ntxiv nws yuav tsuas yog € 130, 00)

Kauj Ruam 2: Teeb Kho Raspberry Pi

Teeb tsa Raspberry Pi
Teeb tsa Raspberry Pi

Thaum koj muaj tag nrho cov khoom. Koj tuaj yeem pib teeb tsa raspberry pi.

  1. Nruab Raspbian OS Software los ntawm Pi lub vev xaib
  2. Rub tawm Etcher los teeb tsa OS ntawm Pi.

• Qhib Etcher hauv computer

• Xaiv cov duab uas koj rub tawm ua ntej

• Xaiv koj daim npav microSD

• Nias lub khawm nyem thiab tos.

3. Thaum cov duab ntawm koj daim npav microSd, qhib rau hauv lub qhov rai tshawb.

• Qhib cov ntawv txt "cmdline.txt"

• Sau "169.254.10.1" tom kawg.

• Tom qab ntawd khaws thiab kaw cov ntawv

4. Ntxig daim npav microSd hauv Raspberry Pi.

• Txuas lub zog rau Raspberry Pi

• Txuas lub network cable mus rau pi thiab koj lub computer

5. Rub tawm putty los txuas rau koj tus raspberry pi

• Xaiv rau hom kev txuas SSH

• Hostname: 169.254.10.1 thiab Port: 22

6. Tam sim no peb tab tom txuas tus pi mus rau wifi

• Ntaus kab lus hais hauv qab no:

wpa_passphrase 'Nov yog koj li SSID' 'Nov yog koj tus password' >> /etc/wpa_supplicant/wpa_supplicant.conf

• Tom qab cov lus txib no koj ntaus kab hauv qab no:

wpa_cli

wb wl0

rov tsim dua tshiab

ctrl + D.

• Yog koj xav pom tus ip ntawm koj tus pi hom hauv qab no:

ifconfig

Kauj Ruam 3: Tau Txais Koj Txoj Cai rau Raspberry Pi

Tau Txais Koj Txoj Cai rau Raspberry Pi
Tau Txais Koj Txoj Cai rau Raspberry Pi

Qhib Pycharm

• Mus rau File Settings Build, Execution, Deployement Deployement

• Ua kom tiav txhua yam raws li nws tshwm ntawm qhov screenshot saum toj no.

2. Tam sim no mus rau kuv github thiab rub tawm cov ntawv

Kauj Ruam 4: Teeb SQL Database

Teeb tsa SQL Database
Teeb tsa SQL Database

Hauv theem no peb yuav teeb tsa SQL database

  1. sudo apt hloov tshiab -y
  2. sudo apt nruab -y python3-venv python3-pip python3-mysqldb mariadb-server
  3. Tam sim no peb tab tom yuav ntxiv tus neeg siv thiab tus lej zais rau hauv lub database

• Tsim tus neeg siv 'FILL_USER_IN'@'localhost' IDENTIFIED BY 'FILL_PASSWORD_IN';

• Tsim DATABASE ntse-daim iav;

• ZOO TSHAJ PLAWS NTUJ NTAWV ntawm ntse-daim iav.* Rau 'FILL_USER_IN'@'localhost' NROG QHOV ZOO TSHAJ PLAWS;

• sudo mariadb <sql/db_init.sql

Tam sim no peb tab tom yuav txuas lub database rau mysql workbench

1. Mus rau mySQL kev sib txuas

2. Nyem rau ntawm "Teeb kev sib txuas tshiab"

3. Npe koj qhov kev sib txuas tshiab

4. Hostname: 169.254.10.1, Chaw nres nkoj: 3306

5. Tus neeg siv lub npe thiab tus lej nkag mus = Saib cov kauj ruam dhau los

6. Qhib qhov kev txuas thiab mus rau kev tswj hwm

7. Nyem rau Cov ntaub ntawv ntshuam thiab ntshuam cov ntaub ntawv sql los ntawm kuv tus github

Kauj Ruam 5: Cia Pib Nrog Kho Vajtse

Cia Peb Pib Nrog Kho Vajtse
Cia Peb Pib Nrog Kho Vajtse
Cia Peb Pib Nrog Kho Vajtse
Cia Peb Pib Nrog Kho Vajtse

Tam sim no peb tuaj yeem pib qhov yooj yim. Yog tias koj ua raws txhua yam ua tiav raws li qhia hauv cov duab saum toj no, koj yuav tsum tsis muaj teeb meem nrog qhov no.

Kauj Ruam 6: Cia Pib Nrog Daim iav

Cia Peb Pib Nrog Daim iav
Cia Peb Pib Nrog Daim iav
Cia Peb Pib Nrog Daim iav
Cia Peb Pib Nrog Daim iav
Cia Peb Pib Nrog Daim iav
Cia Peb Pib Nrog Daim iav

Rau cov kauj ruam no koj xav tau ib tug pom.

  1. Ua ntej peb yuav ua ntu ntu rov qab
  2. Nco ntsoov tias koj yog Plexiglass thiab LCD Monitor haum rau sab nraub qaum.
  3. Dai daim ua ke nrog kua nplaum thiab ntsia hlau

Tam sim no peb yuav ua ntu ntu.

1. Ua kom ntseeg tau tias kab lus hauv ntej sib tshooj 1 cm hla ntu nraub qaum sab hauv

2. Txoj kev ntawd Plexiglass tuaj yeem so ntawm 1 cm.

Tom qab qhov no peb yuav txuas cov yeeb yaj kiab tsom mus rau lub plexiglass (Qhov no yuav siv ob peb zaug)

1. Xyuas kom koj lub plexiglass tsis muaj ntiv tes sau

2. Ntub plexiglass thiab zaj duab xis nrog dej

3. Tam sim no muab zaj duab xis tso rau ntawm lub plexiglass

Kauj Ruam 7: Muab txhua yam tso rau hauv tus ncej

Muab txhua yam tso rau hauv tus ncej
Muab txhua yam tso rau hauv tus ncej
Muab txhua yam tso rau hauv tus ncej
Muab txhua yam tso rau hauv tus ncej
Muab txhua yam tso rau hauv tus ncej
Muab txhua yam tso rau hauv tus ncej

Tam sim no lub thav duab tau sib dhos tag nrho, peb tuaj yeem pib muab txhua yam khoom siv tso rau hauv qhov chaw.

Ua ntej peb yuav pib los ntawm kev coj cov hlua coj ncig lub tsev. Kuv siv daim kab xev ob tog.

Tom qab ntawd peb laum ib lub thav duab hauv txoj hauv kev uas peb tuaj yeem txuas cov hlua coj.

Tam sim no koj tsis khoom koj tseem tuaj yeem hlais 2 lub qhov rau koj lub ntsuas cua sab nraud ntawm koj tus ncej kom tso.

Ib txoj hauv kev uas peb tau txais cov ntaub ntawv sensor zoo dua.

Pom zoo: