Cov txheej txheem:

Ntse Parcel Letterbox (Packr): 13 Cov Kauj Ruam (nrog Duab)
Ntse Parcel Letterbox (Packr): 13 Cov Kauj Ruam (nrog Duab)

Video: Ntse Parcel Letterbox (Packr): 13 Cov Kauj Ruam (nrog Duab)

Video: Ntse Parcel Letterbox (Packr): 13 Cov Kauj Ruam (nrog Duab)
Video: How To Install A Klikka Parcel Letterbox 2024, Kaum ib hlis
Anonim
Ntse Parcel Letterbox (Packr)
Ntse Parcel Letterbox (Packr)
Ntse Parcel Letterbox (Packr)
Ntse Parcel Letterbox (Packr)
Ntse Parcel Letterbox (Packr)
Ntse Parcel Letterbox (Packr)
Ntse Parcel Letterbox (Packr)
Ntse Parcel Letterbox (Packr)

Qee leej neeg feem ntau tsis tau txais ntawv lossis pob khoom. Lawv yuav tsum mus rau lawv lub thawv ntawv txhua hnub los tshuaj xyuas seb puas muaj ntawv xa tuaj tshiab, ob qho tib si thaum los nag thiab thaum lub hnub ci tuaj. Txhawm rau siv lub sijhawm no zoo dua hauv lawv lub neej, ntawm no yog lub thawv xa ntawv ntse. Lub thawv xa ntawv no yuav qhia rau koj paub thaum muaj ntawv tshiab thiab tseem tuaj yeem ruaj ntseg koj cov pob khoom (thaum twg koj xav tau) nrog lub cav uas kaw lub qhov rooj. Cov ntsuas cua kuj ntsuas lub cev qhov tseem ceeb los ntawm sab hauv daim npav npav. Qhov no zoo li nthuav rau koj? Tom qab ntawd ua koj tus kheej!

Khoom siv

  • Raspberry Pi 4 Qauv B / 2GB (1 daim)
  • Thawj Raspberry Pi USB-C 3A fais fab mov Dub (1 daim)
  • 16GB SanDisk Ultra Micro SDHC 80mb/s (1 daim)
  • Sib dhos Pi T -Cobbler Ntxiv - GPIO Breakout (1 daim)
  • Breadbord 830-qhov (1 daim)
  • MB102 Breadboard Power Supply Adapter Shield 3.3V / 5V Geekcreit rau Arduino (1 daim)
  • 65 pcs Mix Xim Txiv neej rau Solderless Flexibele Breadboard Jumper Cable (1 daim)
  • TMP36 Kub Sensor (1 daim)
  • IR Ntes - 5 hli LEDs (2 daim)
  • DHT11 Kub thiab Vaum Ntes (1 daim)
  • 1 Pcs SG90 9G Micro Servo Tsav (2 daim)
  • LCD Module Zaub Screen (1 daim)
  • Liniair Potentiometer 15mm 10K Ohm (1 daim)

Tus nqi tag nrho => nyob ib ncig € 90 (tsis suav nrog)

Kauj Ruam 1: Nruab LAMP ntawm Raspberry Pi - Linux

Nruab LAMP ntawm Raspberry Pi - Linux
Nruab LAMP ntawm Raspberry Pi - Linux
Nruab LAMP ntawm Raspberry Pi - Linux
Nruab LAMP ntawm Raspberry Pi - Linux

Rub tawm Raspberry Pi OS (yav tas los hu ua Raspbian) los ntawm cov nom Raspberry Pi site.

Ntxig daim npav SD rau hauv koj daim npav SD daim npav lossis daim npav SD daim npav yog tias koj muaj. Nco tseg tsab ntawv tsav hauv kab laug sab laug ntawm Windows Explorer, piv txwv li G:

Rub tawm Win32DiskImager ua cov ntaub ntawv teeb tsa, thiab khiav nws los nruab software. Khiav nws thiab xaiv cov ntaub ntawv duab. Hauv lub thawv ntaus ntawv, xaiv daim npav SD (daim duab 1). Nyem 'Sau' thiab tos kom sau kom tiav.

Thaum nws ua tiav, qhib "khau raj" -folder ntawm SD-card thiab ntxiv thiab khoob cov ntaub ntawv hu ua "ssh". Yog lawm, tsis muaj kev txuas ntxiv (daim duab 2)! Tom qab ntawd, koj yuav tsum hloov kho cmdline.txt hauv IDE (tsis txhob siv notepad). Thaum koj qhib cov ntawv koj tsuas yog ntxiv "ip = 169.254.10.1" ntawm qhov kawg ntawm thawj kab thiab txuag.

Yog tias koj tau ua li ntawd, tshem daim npav SD- thiab ntxig rau hauv Raspberry Pi.

Kauj Ruam 2: Nruab LAMP ntawm Raspberry Pi - Apache

Nruab LAMP ntawm Raspberry Pi - Apache
Nruab LAMP ntawm Raspberry Pi - Apache
Nruab LAMP ntawm Raspberry Pi - Apache
Nruab LAMP ntawm Raspberry Pi - Apache
Nruab LAMP ntawm Raspberry Pi - Apache
Nruab LAMP ntawm Raspberry Pi - Apache
Nruab LAMP ntawm Raspberry Pi - Apache
Nruab LAMP ntawm Raspberry Pi - Apache

Thaum Raspbian tau teeb tsa thiab koj tau siv zog ntawm Raspberry Pi, siv Putty txuas rau kab lus txib ntawm SSH kom ua tiav cov lus txib tom ntej. Lub npe siv yooj yim yog "pi" nrog tus password "raspberry".

Ua ntej peb tuaj yeem pib, koj yuav tsum txuas koj li WiFi nrog Raspberry Pi.

  • wpa_passphrase "NAMEOFYOURNETWORK"
  • Ntaus tus password thiab nias Enter
  • Luam qhov tshwm sim
  • sudo nano /etc/wpa_supplicant/wpa_supplicant.conf (daim duab 1)
  • Muab tshuaj txhuam qhov tshwm sim ntawm no thiab kaw nrog ctrl+X, Y thiab Enter
  • sudo rov pib dua

Koj yuav tsum rov pib dua Putty-txuas. Ua ntej pib teeb tsa txhua yam, khiav cov lus txib hauv qab no txhawm rau hloov kho koj Pi.

  • sudo apt hloov tshiab
  • sudo apt hloov tshiab -y

Peb tseem yuav hloov pauv tus tswv tsev ntawm Raspberry Pi thiab pab kom SPI nrog raspi-teeb tsa.

  • sudo raspi-teeb tsa
  • Xaiv 2) Network Options (pic 2)
  • Xaiv N1) Hostname (pic 3)
  • Hom "Packr" (daim duab 4)
  • Xaiv 4) Kev xaiv cuam tshuam (duab 5)
  • Xaiv P4) SPI (duab 6)
  • Xaiv Yog (duab 7)
  • Tawm raspi-config
  • Rov pib dua

Koj yuav tsum tau nkag mus rau hauv dua. Txhawm rau nruab Apache2 ntawm koj Raspberry Pi, khiav cov lus txib tom ntej.

sudo apt nruab apache2 -y

Tam sim no Apache tau teeb tsa! Txhawm rau sim koj kev teeb tsa, hloov mus rau/var/www/html phau ntawv teev npe thiab teev cov ntaub ntawv.

  • cd/var/www/html
  • ls -ua

Koj yuav tsum muaj cov ntawv index.html hauv phau ntawv ntawd.

Kauj Ruam 3: Nruab LAMP ntawm Raspberry Pi - PHP

Txhawm rau nruab PHP ntawm Raspberry Pi, khiav cov lus txib hauv qab no.

sudo apt nruab php -y

Rov pib dua Apache2.

sudo kev pabcuam apache2 rov pib dua

Kauj Ruam 4: Nruab LAMP ntawm Raspberry Pi - MySQL (MariaDB Server)

Nruab MySQL Server (MariaDB Server) siv cov lus txib no

  • sudo apt nruab mariadb-server php-mysql -y
  • sudo kev pabcuam apache2 rov pib dua

Tom qab teeb tsa qhov no, nws pom zoo kom ruaj ntseg rau koj kev teeb tsa.

  • sudo mysql_secure_installation
  • Koj yuav raug nug Sau tus password tam sim no rau lub hauv paus (ntaus tus password kom ruaj ntseg): nias Enter
  • Ntaus Y thiab nias Enter txhawm rau teeb tsa tus lej password
  • Ntaus tus password ntawm tus password tshiab: sai, thiab nias Enter.
  • Ntaus Y kom tshem cov neeg siv tsis qhia npe
  • Ntaus Y kom Tsis Pom Zoo hauv paus nkag mus deb
  • Ntaus Y kom tshem tawm cov ntawv xeem thiab nkag mus rau nws
  • Ntaus Y rau rov ua dua cov rooj tshwj xeeb tam sim no

Tam sim no peb yuav tsim mysql-neeg siv rau peb cov database.

  • sudo mysql --user = hauv paus -password
  • tsim cov neeg siv mysql@localhost txheeb xyuas los ntawm 'Packr2001';
  • muab txhua txoj cai rau *. * rau mysql@localhost;
  • NTSEEG NTAWV QHOV TSEEB;
  • tawm;

Kauj Ruam 5: Nruab LAMP ntawm Raspberry Pi - PhpMyAdmin

Txhawm rau nruab phpMyAdmin ntawm Raspberry Pi, ntaus cov lus txib hauv qab no rau hauv lub davhlau ya nyob twg.

  • sudo apt nruab phpmyadmin -y
  • Xaiv Apache2 thaum hais kom ua thiab nyem Enter
  • Configuring phpmyadmin? OK
  • Configure database rau phpmyadmin nrog dbconfig-ntau? Yog lawm
  • Ntaus koj tus password thiab nias OK

Peb tam sim no yuav pab kom PHP MySQLi txuas ntxiv thiab rov pib dua Apache2.

  • sudo phpenmod mysqli
  • sudo kev pabcuam apache2 rov pib dua

Tam sim no, koj yuav tsum txav phpmyadmin nplaub tshev rau/var/www/html.

sudo ln -s/usr/qhia tawm/phpmyadmin/var/www/html/phpmyadmin

Qhov ntawd yog nws! Koj Raspberry Pi tau npaj nrog LAMP!

Kauj Ruam 6: Kho MySQL

Configurate MySQL
Configurate MySQL
Configurate MySQL
Configurate MySQL

Rub tawm MySQL Workbench thiab nruab nws hauv koj lub computer.

Tsim kev sib txuas tshiab nrog cov ntaub ntawv no, tab sis hloov SSH Hostname los ntawm 169.254.10.1. SSH tus password yog "raspberry" thiab mysql tus password yog "Packr2001" (daim duab 1).

Yog tias koj pom qhov ua yuam kev, koj tuaj yeem nyem rau ntawm "Continue Anything (pic 2). Tshaj li nyem rau" Ok "thiab txuas los ntawm txhaj qhov txuas tshiab!

Kauj Ruam 7: Kho lub Database

Configurate Database
Configurate Database
Configurate Database
Configurate Database
Configurate Database
Configurate Database

Rub tawm tus qauv ntawm Packr-database los ntawm GitHub.

Qhib tus qauv no (daim duab 1) thiab nyem rau ntawm Database => Forward Engineer (daim duab 2).

Nyem 5 zaug ntawm "Tom ntej" (daim duab 3), tab sis rho tawm 2 "VISIBLE" los ntawm cov cai ntawm "Txheeb xyuas SQL Script" (daim duab 4), thiab qhib lub database.

Yog tias koj tuaj yeem pom cov ntaub ntawv "Packr" nrog nws 2 lub rooj (daim duab 5), txhua yam zoo!

Kauj Ruam 8: Txuas tus Code-editor rau Raspberry Pi

Txuas tus Code-editor rau Raspberry Pi
Txuas tus Code-editor rau Raspberry Pi
Txuas tus Code-editor rau Raspberry Pi
Txuas tus Code-editor rau Raspberry Pi
Txuas tus Code-editor rau Raspberry Pi
Txuas tus Code-editor rau Raspberry Pi

Rub tawm thiab teeb tsa Visual Studio Code ntawm koj lub computer.

Thaum teeb tsa, koj tuaj yeem qhib nws thiab teeb tsa "Kev Txhim Kho Chaw Nyob"-txuas ntxiv (daim duab 1).

Nias rau F1 thiab ntaus "ssh", xaiv rau "Remote-SSH: Ntxiv SSH Host Tshiab …" (daim duab 2).

Hom "ssh 169.254.10.1 -A" thiab nias Enter kom paub meej (daim duab 3).

Tsuas yog nias Enter ntawm cov kauj ruam tom ntej (daim duab 4).

Qhib qhov kev txuas los ntawm nias dua ntawm F1 thiab nyem rau ntawm "Remote-SSH: Txuas rau Tus Tswv Tsev …" tom qab ntaus "SSH".

Xaiv "169.254.10.1" (pic 5), ntaus koj tus password ("raspberry") thiab nias Enter. Yog tias koj tau txais kev ceeb toom, tsuas yog Txuas Ntxiv.

Tam sim no teeb tsa "Python"-txuas ntxiv los ntawm kev ua tib yam li txhim kho qhov txuas ntxiv yav dhau los (daim duab 6).

Kauj ruam 9: Ntshuam Txoj Cai

Ntshuam Txoj Cai
Ntshuam Txoj Cai
Ntshuam Txoj Cai
Ntshuam Txoj Cai
Ntshuam Txoj Cai
Ntshuam Txoj Cai

Qhib lub davhlau ya nyob twg lossis siv Putty kom ua tiav cov lus txib hauv qab no.

mkdir Packr Cov

Qhib tus tshiab "Packr" -folder hauv Visual Studio code (pic 1), ntxiv rau "html" -folder uas koj tuaj yeem pom ntawm/var/www/(pic 2).

Txhawm rau siv "html" -folder, koj yuav tsum tau muab koj tus kheej tso cai rau. Ntaus cov lus txib hauv qab no hauv lub davhlau ya nyob twg lossis hauv Putty.

sudo chmod 777/var/www/html/

Rub tawm Backend thiab Frontend nplaub tshev thiab rub cov ntawv thiab cov ntawv los ntawm Backend rau hauv "Packr" -folder hauv Visual Studio Code, thiab txhua yam los ntawm Frontend mus rau "html" -folder (daim duab 3).

Qhib Google Chrome (lossis simular) thiab mus rau koj li Raspberry Pi's IP. Koj puas pom Packr-site? Ua haujlwm zoo! Nws yog ib txwm uas tsis muaj dab tsi ua haujlwm tseem tsis tau tiav, koj tsis muaj cov khoom siv txuas lossis siv cov cai tam sim no.

Kauj Ruam 10: Nruab Cov Cuab Yeej Ntxiv

Nruab Cov Cuab Yeej Ntxiv
Nruab Cov Cuab Yeej Ntxiv

Txhawm rau kom txoj cai ua haujlwm kom raug, peb yuav tsum teeb tsa ob peb yam ntxiv. Piv txwv li, peb yuav tsum teeb tsa MySQL-txuas los ntawm kev ua kab hauv qab no.

pip3 nruab mysql-connector-python

Peb kuj yuav tsum tau teeb tsa lub hwj-socketio, hwj-cors thiab gevent (daim duab 1).

  • pip3 nruab flask-socketio
  • pip3 nruab flask-cors
  • pip3 nruab gevent
  • pip3 nruab gevent-websocket

Kauj Ruam 11: Cia Txoj Cai Ua Tau Zoo

Cia Txoj Cai Khiav Yeej
Cia Txoj Cai Khiav Yeej

Tsim cov kev pabcuam tshiab los ntawm kev ua raws cov lus txib hauv qab no hauv Putty.

sudo nano /lib/systemd/system/Packr.service

Hauv cov ntawv khoob uas qhib, sau cov cai uas tuaj yeem pom hauv Packr.service ntawm GitHub (daim duab 1). Yog tias koj ua tiav, txuag cov ntawv los ntawm nias ctrl+X, Y thiab Enter.

Rov ua dua cov kev pabcuam nrog cov lus txib hauv qab no.

sudo systemctl daemon-reload

Kauj Ruam 12: Txuas Cov Khoos Phis Tawj

Txuas Cov Khoom Kho Vajtse
Txuas Cov Khoom Kho Vajtse
Txuas Cov Khoom Kho Vajtse
Txuas Cov Khoom Kho Vajtse

Tam sim no tag nrho cov cai tau npaj thiab software rau txoj haujlwm tau ua tiav, peb tab tom txuas cov cuab yeej kho vajtse. Txog qhov no koj yuav xav tau txhua feem ntawm kho vajtse thiab koj tuaj yeem siv Fritzing-cov ntaub ntawv los pab. Rub tawm daim ntawv qhia zaub mov lossis saib cov khoom siv hluav taws xob thiab pib txuas! Thaum ua tiav, qhib lub zog thiab rov pib dua Raspberry Pi kom pib qhov chaws tau txais!

Kauj Ruam 13: Ua Case

Ua Case
Ua Case
Ua Case
Ua Case
Ua Case
Ua Case

Txhawm rau siv tag nrho cov cuab yeej kho mob uas nws tau npaj tseg, koj yuav tsum tau ua rooj plaub. Qhov no tuaj yeem ua los ntawm ntoo, uas tsis yog dej tsis tau, tab sis kuj tawm ntawm yas, uas tsis muaj dej. Rau qhov no koj tuaj yeem kos thiab lasercut tsim nrog koj tus kheej tsim, lossis koj tuaj yeem siv kuv li. Rub tawm phaj 1 thiab phaj 2 los ntawm GitHub. Cov qauv tsim no tau ua rau lub thawv me me uas yeej tsis haum rau pob zoo, yog li siv koj li kev ntsuas thiab kho kuv li (piv txwv) Inkscape!

Tom qab ua rooj plaub Packr tau npaj rau siv! Txaus siab rau thiab qhia koj cov kev paub dhau los!

Pom zoo: