Cov txheej txheem:

Hnab Hnab Ntse: 8 Kauj Ruam
Hnab Hnab Ntse: 8 Kauj Ruam

Video: Hnab Hnab Ntse: 8 Kauj Ruam

Video: Hnab Hnab Ntse: 8 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Ntse Hnab
Ntse Hnab

Yog tias koj yog tub ntxhais kawm zoo li kuv, qee tus ntawm koj yuav muaj feem cuam tshuam nrog qhov teeb meem uas kuv tsis nco qab. Kuv tsis muaj sijhawm ntau los ua kuv lub hnab ev, thiab ua ntej koj paub nws, koj hnov qab qee yam.

Kuv sim ua kuv lub neej yooj yim dua los ntawm kev ua Raspberry pi project nrog lub vev xaib sib tham uas ua raws koj cov khoom.

Lub tswv yim yog tso RFID-daim ntawv nplaum rau txhua yam koj xav tau, ua cov npe nrog yam koj xav tau ntawm lub vev xaib. Thiab lub sijhawm koj yuav tsum ua koj lub hnab ev ntawv, koj qhib cov npe, luam theej duab txhua yam thiab muab tso rau hauv koj lub hnab ev ntawv.

Khoom siv

  • hnab ev
  • sib nqus chav-sensor
  • hlau nplaum
  • TXL345
  • 16*2 LCD
  • YWB 3008
  • FWB 522
  • 4.7K ohm resistor
  • xov hlau
  • solder tin
  • cua sov ntsws
  • raspberry pi 3b+, lub hwj chim
  • micro SD daim npav (8gb +)
  • muaj zog kua nplaum
  • 13.56Mhz rfid cim npe

Cov Cuab Yeej:

  • ntsia hlau
  • cam khwb cia hlau
  • riam
  • dismantle cov pliers

Kauj ruam 1: Kho lub Raspberry Pi

Thaum koj muaj tag nrho koj cov khoom siv peb tuaj yeem pib!

  1. Muab koj daim npav microSD tso rau hauv koj lub computer;
  2. Rub tawm Raspbian OS duab los ntawm
  3. Nyem cov duab ntawm micro SD-daim npav nrog software zoo li Etcher lossis win32diskimager;
  4. Mus rau hauv qhov muab faib tau ntawm SD-card thiab qhib cmdline.txt ntawv nrog notepad;
  5. Ntxiv ip = 169.254.10.1 txuag thiab kaw;
  6. Tam sim no muab koj daim npav micro-SD tso rau hauv koj lub raspberry pi;
  7. ib zaug nws tau khau raj, rub tawm Putty;
  8. Tam sim no, txuas rau koj tus raspberry pi los ntawm kev siv tus ip-adress peb tau ntaus ua ntej lawm;
  9. Nkag mus nrog tus neeg siv pi thiab password raspberry
  10. Ntaus sudo raspi-teeb tsa, hloov koj tus password, mus rau kev sib tham xaiv, hloov lub hostname ntawm koj tus pi. Mus rau cov kev xaiv hauv zos thiab hloov pauv koj lub tebchaws wi-fi thiab thaj chaw sijhawm. Tom ntej no, mus rau kev xaiv khau raj, tig tos rau lub network ntawm khau raj tawm thiab tos kom txaws npo tawm. Thaum kawg mus rau kev xaiv cuam tshuam thiab qhib i2c thiab spi interface.
  11. Txuas nrog wi-fi siv cov kauj ruam hauv qab no txuas rau wifi.
  12. Ua cov lus txib sudo apt-hloov tshiab thiab sudo apt-upgrade.

Kauj ruam 2: MySQL / Mariadb

MySQL / Mariadb
MySQL / Mariadb

Tam sim no peb yuav ntxiv cov ntaub ntawv khaws cia rau peb cov raspberry pi.

  • Ua ntej tshaj plaws, ua cov lus txib hauv qab no:

    • sudo apt-tau nruab mysql-server, mysql-client
    • mysql -u hauv paus -p
    • tsim cov neeg siv 'hauv paus'@'localhost' txheeb xyuas los ntawm tus lej zais;
    • ZOO TSHAJ PLAWS NTAWM *. * TO 'hauv paus'@'%'
    • Tam sim no theej cov cai ntawm cov ntaub ntawv sql thiab muab tshuaj txhuam rau hauv Putty thiab ua nws

Kauj Ruam 3: Tsim Cov Hluav Taws Xob Hluav Taws Xob

Tsim Cov Hluav Taws Xob Hluav Taws Xob
Tsim Cov Hluav Taws Xob Hluav Taws Xob
Tsim Cov Hluav Taws Xob Hluav Taws Xob
Tsim Cov Hluav Taws Xob Hluav Taws Xob
Tsim Cov Hluav Taws Xob Hluav Taws Xob
Tsim Cov Hluav Taws Xob Hluav Taws Xob

Tam sim no peb tab tom tsim hluav taws xob hluav taws xob. Kuv hais kom tsim qhov no nrog jumper cables thiab lub khob cij ua ntej, vim nws ntau heev.

Ua raws txoj kev Fritzing. Kuv siv cov xov hluav taws xob ntev rau lub sensor sensor, rfid-nyeem ntawv thiab lub vijtsam lcd. Kuv tau siv cov hlua txuas mus rau qhov kawg ntawm poj niam jumper hlau, yog li kuv tsis tas yuav muab txhua yam ncaj qha mus rau raspberry pi pins. Yog tias koj tsis ua qhov no, qhov zoo, tab sis koj yuav tsum tau tos kom muab txhua yam rau tus pi.

Kauj Ruam 4: Tsim Lub Hnab Hnab

Tsim lub hnab ev ntawv
Tsim lub hnab ev ntawv
Tsim lub hnab ev ntawv
Tsim lub hnab ev ntawv
Tsim lub hnab ev ntawv
Tsim lub hnab ev ntawv
Tsim lub hnab ev ntawv
Tsim lub hnab ev ntawv

Tam sim no peb tab tom tsim txhua yam hauv hnab ev khoom. Kuv ua txhua yam hauv hnab tshos ncig ntawm daim duab saum toj no.

  • Sab hauv lub hnab no, txiav lub qhov kom koj tuaj yeem tau nruab nrab ntawm ob txheej txheej ntawm cov ntaub, peb yuav siv qhov no rau cov xov tooj rau rfid nyeem ntawv thiab LCD.
  • tam sim no ua tib zoo txua ib lub xwmfab siv lub vijtsam LCD raws li kev siv ntawm qhov loj me.
  • Tam sim no peb tab tom yuav tso RFID-nyeem ntawv nrog cov xaim ua ntej los ntawm lub qhov, nco ntsoov tias cov xaim hluav taws xob tawm ntawm lub qhov peb muab tso rau sab hauv ntawm lub hnab tshos sab hauv ntawm lub hnab ev ntawv.
  • Tam sim no, siv cov kua nplaum muaj zog los lo cov rfid nyeem ntawv sab hauv, Kuv tau sim siv superglue, tab sis nws tsis lo rau ntawm tawv, Kuv qhia koj kom siv Pattex 100% kua nplaum, txij li qhov no tau ua kua nplaum.
  • Tam sim no ua tib zoo tso LCD cov kab hluav taws xob ua ntej dhau los ntawm lub qhov, thiab ua kom cov kab hluav taws xob tawm mus rau lwm lub qhov, thiab muab cov LCD tso rau hauv lub hnab ev ntawv.
  • Tam sim no sab hauv lub hnab ev khoom, tso ib lub zipper rau ntawm qhov kawg ntawm lub hnab ev ntawv, thiab muab cov khoom sib nqus tso rau ntawm lub zipper no. Ntawm lwm tus zipper nplaum cov hlau nplaum. Nco ntsoov tsis txhob siv ntau cov kua nplaum rau cov hlau nplaum, koj tsis xav kom lub zipper kaw. Txog cov ntsuas hluav taws xob sib nqus, qhov no tsis yog qhov teeb meem loj, vim tias txoj hlua ntev lub zipper no yuav nyob tas li nws txoj haujlwm.
  • Tam sim no koj tuaj yeem txuas txhua yam rau tus pi, lossis yog tias koj siv tus poj niam jumper cables, yooj yim muab tso rau ntawm qhov chaw raug yog siv Fritzing tswvyim.
  • Xaiv tau, koj tuaj yeem ua lub zog raspberry pi siv lub txhab nyiaj.

Kauj ruam 5: Code

Tam sim no lub tsev tsim ua tiav, rub tawm cov cai ntawm no: github. Muab nws tso rau ntawm daim nplaub tshev ntawm koj tus raspberry pi siv (S) FTP lossis clone lub chaw cia khoom ntawm koj pi ncaj qha. Cov cai muaj qee qhov ntsuas ntsuas rau lub ntsuas cua, nco ntsoov xyuas cov ntawd yog tias koj muaj teeb meem.

Kauj Ruam 6: Lub vev xaib

Tam sim no peb yuav tig peb pi mus rau hauv lub vev xaib.

Ua qhov hais kom ua sudo apt -tau nruab apache2 -y

  • Xauj ntawm koj lub khoos phis tawj mus rau tus pi chaw nyob, uas yuav tsum yog 169.254.10.1 yog tias koj tseem txuas nrog UTP-cable, yog tias koj pom nplooj ntawv apache, uas txhais tau tias nws tau teeb tsa ua tiav.
  • tam sim no txav mus rau ntawm daim nplaub tshev ntawm tus lej koj rub tawm rau/var/www/html siv cov lus txib mv.
  • Tom qab koj tso cov cai nyob rau ntawd, ntaus qhov hais kom ua sudo service apache2 rov pib dua.
  • Tam sim no koj yuav tsum pom lub vev xaib sib tham yog tias koj nthwv mus rau pi's ip-adress.

Kauj ruam 7: Autorun

Tam sim no peb yuav tsum paub tseeb tias tsab ntawv sau cia yog tias koj khau raj koj li pi.

  • Kho cov ntaub ntawv rc.local, siv sudo nano /etc/rc.local
  • Ntxiv cov lus txib kom ua tiav koj cov cai, qhov no yuav yog nab hab sej3.5 /yourpath/project.py &
  • Nco ntsoov tawm qhov tawm 0 hauv qab.
  • tam sim no ua sudo reboot thiab xyuas yog tias nws ua haujlwm.

Kauj ruam 8: Xaus

Tam sim no, thaum koj khau raj koj tus pi, tus IP chaw nyob yuav tsum tshwm ntawm LCD-screen, nthwv dej rau lub vijtsam no kom qhib lub web-interface.

Pom zoo: