Cov txheej txheem:

FoodPlate: Phaj Uas Khaws Koj Cov Khoom Noj Kom sov: 11 Kauj Ruam
FoodPlate: Phaj Uas Khaws Koj Cov Khoom Noj Kom sov: 11 Kauj Ruam

Video: FoodPlate: Phaj Uas Khaws Koj Cov Khoom Noj Kom sov: 11 Kauj Ruam

Video: FoodPlate: Phaj Uas Khaws Koj Cov Khoom Noj Kom sov: 11 Kauj Ruam
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Hlis ntuj nqeg
Anonim
FoodPlate: Phaj Uas Khaws Koj Cov Khoom Noj Kom sov
FoodPlate: Phaj Uas Khaws Koj Cov Khoom Noj Kom sov

Koj puas tau ntsib dua tias koj cov zaub mov tau txias thaum koj tseem noj mov?

Hauv cov lus qhia no, Kuv yuav koj piav qhia yuav ua li cas ua kom cov phaj sov. Tsis tas li, daim phaj no yuav ua kom ntseeg tau tias tsis muaj dab tsi tuaj yeem poob los ntawm nws los ntawm kev khoov nws.

Qhov txuas rau kuv GitHub yog:

Kauj Ruam 1: Cheeb Tsam

Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam

Txog qhov haujlwm no peb xav tau cov khoom siv/cov cuab yeej/Cov khoom hauv qab no:

Cheebtsam

  • Raspberry Pi 3 qauv B+ (€ 35, 66)
  • Raspberry Pi fais fab mov (€ 18.95) (Daim duab 1)
  • PCB RAU PED PLATE RAU K8200 - 3D tshuab luam ntawv (ZOO TSHAJ PLAWS) (€ 31.00) (Duab 2)
  • NTC (€ 2.00) (Daim duab 3)
  • Fais fab mov rau PCB (€ 35.11) (Duab 4+5)
  • Relay - 3.3V rau Pi !!! (€ 4.40) (Duab 6)
  • MPU-6050 (gyros + accelero) (€ 3.95) (duab 7)
  • Load cell - 1KG (€ 4.96) (Daim duab 8)
  • HX711 (rau load cell) (Sits by Load cell) (Daim duab 9)
  • LCD (€ 16.07) (Duab 10)
  • Buzzer nquag (€ 2.83) (Duab 11)
  • Trimmer (€ 0, 63)
  • 7 "JUMPER WIRES, 30 STUKS (€ 17, 97)

Cov cuab yeej

  • Soldering hlau
  • Phom phom
  • Saber sawv

Khoom siv

Ntoo

Saib daim ntawv Excel kom ua tiav daim ntawv teev npe.

Tus nqi tag nrho ntawm txoj haujlwm no yog 3 183.

Kauj ruam 2: Tsim Circuit Court

Tsim lub Circuit
Tsim lub Circuit
Tsim lub Circuit
Tsim lub Circuit
Tsim lub Circuit
Tsim lub Circuit

Thawj kauj ruam koj yuav tsum tsim lub Circuit Court (saib PDF 1 + 2 + duab 3 + 4)

Nws yog qhov zoo tshaj plaws uas koj ua qhov no ua ntej ntawm lub khob cij. Tom qab ntawd, koj tuaj yeem txhuam txhua yam ua ke. Koj tuaj yeem siv rab yaj phom los ntxiv dag zog rau kev ua haujlwm.

Tom qab ntawd koj muab txhua yam tso rau hauv lub thawv ntoo ntawm 35 x 33 x 5, 5cm. Koj tuaj yeem pom qhov nrog lub saber pom.

Tom qab ntawd tso lub cell load rau ntawm lub platform kom lub phaj cua sov nyob ntawm nws.

Ceev cov cua sov phaj nrog cov ntsia hlau. Muab cov springs ncig cov ntsia hlau kom lub phaj ib txwm tuaj.

Kauj Ruam 3: Kev Sib Txuas rau Raspberry Pi

Kev sib txuas rau Raspberry Pi
Kev sib txuas rau Raspberry Pi
Kev sib txuas rau Raspberry Pi
Kev sib txuas rau Raspberry Pi
Kev sib txuas rau Raspberry Pi
Kev sib txuas rau Raspberry Pi

Ua ntej koj rub tawm thiab nruab qhov dawb version ntawm MobaXterm (https://mobaxterm.mobatek.net/download.html) thiab Raspbian (https://www.raspberrypi.org/downloads/raspbian/)

Tom qab ntawd qhib qhov program thiab nyem rau ntawm "Session" nyob rau sab saud sab saud.

Tom qab ntawd sau rau hauv IP chaw nyob ntawm Pi hauv qab "Tus tswv tsev nyob deb". Ntawm "Qhia meej lub npe" sau koj lub npe siv. Tom qab ntawd koj nias "OK" hauv qab ntawm qhov screen.

Thaum koj tau ua tiav qhov no, nws yuav cia li pib kev sib txuas. Tom qab qhov no koj yuav tsum nkag mus rau koj tus password. Tam sim no koj muaj kev sib txuas nrog koj Pi.

Kauj Ruam 4: Qhib SPI

Qhib SPI
Qhib SPI
Qhib SPI
Qhib SPI
Qhib SPI
Qhib SPI

Vim tias peb siv MCP3008, peb yuav tsum qhib SPI.

Txog qhov no koj ntaus hauv MobaXterm: "sudo raspi-config".

Tom qab ntawv, koj xaiv "Interface Options".

Tom qab ntawv nyem rau "SPI". Tom qab ntawv, nyem rau "Yog".

Tom qab ntawd mus rau MobaXterm thiab nkag mus rau cov lus txib hauv qab no:

sudo apt-tau nruab python3-spidev

Kauj Ruam 5: Teeb tsa Web Server

Teeb tsa Web Server
Teeb tsa Web Server
Teeb tsa Web Server
Teeb tsa Web Server
Teeb tsa Web Server
Teeb tsa Web Server

Tam sim no koj rov qab mus rau MobaXterm console.

Ua ntej peb yuav ua qhov hloov tshiab thiab hloov kho ntawm Raspbian yog li peb muaj qhov hloov tshiab kawg. Koj tuaj yeem ua qhov no nrog cov lus txib hauv qab no:

  • sudo apt-tau hloov tshiab
  • sudo apt-tau hloov tshiab

Tom qab ntawd peb yuav nruab Apache. Nrog rau qhov kev teeb tsa no koj tuaj yeem saib lub vev xaib ntawm txhua lub cuab yeej hauv koj lub network.

Koj ua qhov no nrog cov lus txib hauv qab no:

sudo apt-tau nruab apache2

Tam sim no mus rau daim nplaub tshev tom ntej los ntawm kev sau cov kab no hauv kab (saib daim duab 5):

/var/www/html/

Ntawm no koj tuaj yeem tso tag nrho cov ntaub ntawv los ntawm "Pem Hauv Ntej" nplaub tshev.

Koj tuaj yeem ua qhov no los ntawm txhaj rau lub cim tso tawm (saib daim duab 6).

Kauj Ruam 6: Teeb Tus Xa Ntawv Xa Ntawv

Teem Sijhawm Xa Ntawv
Teem Sijhawm Xa Ntawv
Teem Sijhawm Xa Ntawv
Teem Sijhawm Xa Ntawv
Teem Sijhawm Xa Ntawv
Teem Sijhawm Xa Ntawv

Ua ntej tshaj plaws, koj yuav tsum tsim tus as khauj ntawm Gmail.

Tom qab ntawd nthwv mus rau lub vev xaib no thiab teeb nws rau "On" (https://myaccount.google.com/u/1/lesssecureapps?pli=1&pageId=none).

Tom qab ntawv, qhib "class_mail.py" siv cov ntawv sau. Qhov no tuaj yeem pom hauv daim nplaub tshev "cov chav kawm". Tom qab ntawv, koj tuaj yeem hloov email chaw nyob thiab tus lej zais uas tau siv rau koj tus lej Gmail.

Kauj Ruam 7: Hloov Cov Ntaub Ntawv Python

Hloov cov Python Cov Ntaub Ntawv
Hloov cov Python Cov Ntaub Ntawv

Tam sim no peb tab tom sim ua kom rov qab ua haujlwm.

Ua ntej koj tsim daim nplaub tshev tshiab hu ua "project1".

Tom qab ntawd upload tag nrho.py cov ntaub ntawv los ntawm "Backend" nplaub tshev rau hauv nws.

Tam sim no peb tuaj yeem pib ntawm SQL server.

Kauj Ruam 8: Teeb SQL + Ntshuam Database

Teeb SQL + Ntshuam Database
Teeb SQL + Ntshuam Database
Teeb SQL + Ntshuam Database
Teeb SQL + Ntshuam Database
Teeb SQL + Ntshuam Database
Teeb SQL + Ntshuam Database

Kev sib txuas rau lub database

Ua ntej koj nruab MySQL workbench. (Nyem qhov no mus rau MySQL lub vev xaib)

Tom qab ntawd qhib MySQL Workbench thiab nyem rau ntawm qhov kos npe ntxiv (saib duab 1).

Tom qab ntawd sau rau hauv cov teb hauv qab no (saib duab 2):

  • Lub npe kev sib txuas

    • Lub npe ntawm kev sib txuas
    • Piv txwv li: Project1
  • Hostname

    • Tus IP chaw nyob uas koj Pi txuas nrog.
    • Piv txwv li: 169.254.10.1
  • Chaw nres nkoj

    3306

  • Tus neeg siv lub npe

    Lub npe siv uas koj siv los teeb tsa koj li MariaDB nrog

Tom qab ntawv nyem rau "Test connection".

Tam sim no koj pom koj qhov kev sib txuas (saib duab 3). Txhawm rau qhib nws, ob npaug nias rau nws.

Ntshuam lub database

Txhawm rau ntshuam cov ntaub ntawv khaws tseg, nyem rau ntawm "Cov ntaub ntawv ntshuam/Restore" nyob rau sab laug. (duab 4)

Tom qab ntawd, koj xaiv hauv qab "Ntshuam los ntawm Cov Ntaub Ntawv Tus Kheej" sql-file uas koj tuaj yeem pom hauv Github chaw cia khoom hauv daim nplaub tshev "Database".

Yog tias qhov no ua tiav, koj tuaj yeem mus rau theem tom ntej uas koj tuaj yeem pib qhov haujlwm tau txais thaum koj ntsaws rau hauv pawg thawj coj.

Kauj Ruam 9: Pib Qhov Kev Pab Cuam Thaum Koj Txuas Hluav Taws Xob

Pib Qhov Kev Pab Cuam Thaum Koj Txuas Hluav Taws Xob
Pib Qhov Kev Pab Cuam Thaum Koj Txuas Hluav Taws Xob
Pib Qhov Kev Pab Cuam Thaum Koj Txuas Hluav Taws Xob
Pib Qhov Kev Pab Cuam Thaum Koj Txuas Hluav Taws Xob
Pib Qhov Kev Pab Cuam Thaum Koj Txuas Hluav Taws Xob
Pib Qhov Kev Pab Cuam Thaum Koj Txuas Hluav Taws Xob

Thawj zaug mus rau MobaXterm.

Tom qab ntawd ntaus cov lus txib hauv qab no:

sudo crontab -e

Tom qab ntawv ntaus tus lej 2.

Tam sim no ntaus cov lus txib hauv qab no:

@reboot python3.5 /home/dp-user/Documents/project1/app.py

Tom qab ntawd koj ua qhov tseem ceeb ua ke hauv qab no:

ctrl+x os

Tom qab ntawv nyem rau "y". Tom qab ntawd nyem rau nkag mus.

Thaum kawg, ntaus cov lus txib hauv qab no

sudo rov pib dua

Kauj ruam 10: Ntxiv Kev Txhais Lus

Ntxiv Kev Txhais Lus
Ntxiv Kev Txhais Lus

Txhawm rau ntxiv kev txhais lus, pib "Translation_add.py". Koj tuaj yeem ua qhov no los ntawm kev mus rau daim nplaub tshev "project1" (ntawm cd), thiab ua raws cov lus txib hauv qab no:

  • cd/tsev // Cov Ntaub Ntawv/project1 (Hais kom mus rau sab xis)
  • python3.5 Txhais lus_add.py

Tom qab ntawd koj sau cov lus Askiv, Dutch thiab Fabkis lo lus lossis kab lus.

Tom qab ntawv nyem rau nkag. Tam sim no cov lus/kab lus nyob hauv lub database.

Kauj Ruam 11: Tus Neeg Siv Phau Ntawv + Ua Tsaug

Hauv kab lus no koj yuav pom yuav siv lub vev xaib li cas.

Ua tsaug rau koj nyeem cov ntawv qhia no thiab vam tias koj cov zaub mov yuav tsis txias dua.

Pom zoo: