Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Kev thaiv kab
- Kauj ruam 2: Database
- Kauj Ruam 3: Daim iav Tsev
- Kauj ruam 4: Code
- Kauj Ruam 5: Khiav Daim iav ntawm PI
Video: SmartMirror Nrog Backlighting: 5 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Tom qab txheej txheem kev xav ntev kuv tau los xaus los tsim lub iav ntse. Kuv muaj tus cwj pwm uas muaj lub sijhawm pw tsaug zog tsis xwm yeem yog li kuv xav kom daim iav no pab thiab teev kuv lub sijhawm sawv thiab lwm yam. Kuv xav kom nws yooj yim thiab siv 3 lub ntsuas pa thiab ntawm qhov tseeb teeb pom kev zoo.
Kuv yuav coj koj mus dhau txoj kev tsim kuv lub tswv yim.
Khoom siv
Sensors
- Ib Qhov Kub Kub Sensor (DS18S20)
- DHT11 Vaum & Kub sensor
- Infrared tsab ntawv tsa suab sensor
Lwm yam
- Raspberry Pi 3
- Ob txoj kev acrylic iav.
- Khoos phis tawj saib
- Ntoo ntoo
- Coj sawb
- LED sawb 120LED/m 5050
- HDMI Cable
- Mosfets IRFZ44N
- Cov qhob cij
- Hlau
- SD daim npav
- 4, 7K, 1K, 2K Resistors
Kauj ruam 1: Kev thaiv kab
Qhov no yog qhov thaiv nrog cov xav tau cov ntsuas thiab cov tiv thaiv. Peb xav tau lub hwj chim 12V los siv qhov no ntawm lub khob cij. Hauv cov phiaj xwm no yog nyob ntawm tib daim ntawv tais tab sis qhov tseeb nws muaj kev nyab xeeb dua los ua qhov no ntawm cov qhob cij cais.
Kauj ruam 2: Database
Qauv
Cov chaw khaws ntaub ntawv tuaj yeem khaws cov ntaub ntawv ntawm 2 lub ntsuas cua uas xa cov ntaub ntawv. Nws muaj tus lej tshwj xeeb los txheeb xyuas qhov ntsuas ua ke nrog tus nqi thiab sensorID. Lub sijhawm ntsuas kuj tseem khaws cia. Cov ntsuas muaj lub rooj txawv teb chaws los txheeb xyuas lawv hauv lawv lub rooj niam txiv.
Tso tawm:
Peb yuav xav tau xa cov ntaub ntawv no mus rau pi tab sis ua ntej peb yuav tsum nruab MariaDB.
sudo apt nruab mariadb-server
ces:
mysql_secure_installation
Tsuas yog nias nkag. Tom qab ntawd Y thiab nkag mus lo lus zais 2 zaug.
Tsuas yog nias Y rau tag nrho cov txheej txheem.
Ces ntaus:
mysql -u hauv paus -p
Sau koj tus password rau kev txuas.
Tom qab ntawd xa cov ntaub ntawv khaws cia rau PI thiab koj zoo mus.
Koj tuaj yeem pom kuv SQL database hauv qab no.
Kauj Ruam 3: Daim iav Tsev
Kuv siv ntoo MDF los tsim daim iav no. Kuv xub tsim lub xwmfab tso rau daim iav thiab lwm lub xwmfab tso rau saib thiab khoom siv hluav taws xob tom qab. Kuv txuas daim iav nrog rwb thaiv tsev kom nws txav tsis tau ntxiv lawm. Kuv siv woodglue los ua kua nplaum 2 woos plaub fab ua ke.
Kuv drilled ib lub qhov kom tso cov hlua LED hla los txuas nws rau sab ntawm daim iav. Cov hlua LED tau txuas nrog daim kab xev cais.
Kuv pleev xim rau daim iav kom ua tiav zoo. Nws kuj tseem ua tau zoo nrog daim kab xev.
Kuv txuas tus saib nrog 2 txoj kab xev muaj zog. Hmoov zoo qhov no yog qhov ua yuam kev vim tias koj tuaj yeem pom daim kab xev dawb los ntawm daim iav. Kuv tau kaw daim iav tom qab nrog daim kab xev dub kom lub teeb hla tsis dhau.
Kuv glued lub breadboards thiab pi rau sab nraum qab ntawm tus saib.
Kauj ruam 4: Code
Kuv coded tus HTML, css thiab javascript hauv Visualstudio Code thiab kuv backend hauv Pycharm nrog Python.
Kuv siv ntau qhov nyob rau cov ntaub ntawv nyob ntawm kuv lub vev xaib thiab ob peb qhov kev ntsuas rau kev ntsuas txhua hnub. Thaum daim iav ua haujlwm nws yuav tso saib lub ntsuas qhov ntsuas nyob rau lub sijhawm ntawd thiab lub sijhawm hauv cheeb tsam.
Koj tuaj yeem pom kuv tus lej ntawm no: GitHub Repository
Kauj Ruam 5: Khiav Daim iav ntawm PI
Vijtsam
Txhawm rau tig lub vijtsam kom dai nws ib sab koj yuav tsum taw rau:
sudo nano /boot /config.txt
thiab ntxiv kab hauv qab no hauv qab:
display_rotate = 1
Apache
Txhim kho apache webserver:
sudo apt nruab apache2 -y
Rub tawm txhua cov ntaub ntawv txuas mus rau/var/www/html/nrog filezilla thiab nws yuav khiav ntawm sebserver.
Backend
Autorun tus backend hauv rc.local:
sudo nano /etc/rc.local
Ntxiv cov kab hauv qab no ua ntej 'tawm 0' tab sis siv qhov chaw ntawm koj cov ntaub ntawv backend:
sudo nab hab sej /home/gilles/mirror.py
Tam sim no PI tab tom khiav lub vev xaib thiab backend thaum pib.
Khiav daim iav nplooj
Tam sim no peb xav kom tus pi khiav lub html nplooj ntawv ntawm tus tswv hauv zos hauv puv npo (peb daim iav tsom iav)
tsim ib tsab ntawv hauv koj txoj hauv kev xav nrog cov cai no:
#!/bin/bashsleep 20DISPLAY =: 0 chromium --noerrdialogs --kiosk https://localhost/mirror.html --incognito
Tam sim no khaws cov ntawv thiab mus rau:
sudo nano lxsession/LXDE-pi/autostart
tom qab ntawd ntxig kab kab ntawv no hauv qab:
@sh tsab ntawv.sh
Daim iav tam sim no yuav pib siv thaum pib thiab koj yuav pom koj tus kheej daim iav ntse!
Tsuas yog nthwv mus rau IP chaw nyob ntawm lub vijtsam thiab koj tuaj yeem nkag mus rau lub vev xaib ntawm koj lub xov tooj, laptop …
Pom zoo:
Tsev Automation Kauj Ruam ntawm Kauj Ruam Siv Wemos D1 Mini Nrog PCB Tsim: 4 Kauj Ruam
Tsev Automation Kauj Ruam Ib Leeg Siv Wemos D1 Mini Nrog PCB Tsim: Tsev Automation Kauj Ruam los ntawm Kauj Ruam siv Wemos D1 Mini nrog PCB Tsim cov tub ntxhais kawm ntawv qib siab. Tom qab ntawd ib tus ntawm peb cov tswv cuab tuaj
DIY SmartMirror: 6 Kauj Ruam
DIY SmartMirror: Yog lawm, nws ntse heev
Yuav Ua Li Cas Thiaj Li Tshem Tawm Lub Computer Nrog Cov Kauj Ruam Yooj Yim thiab Duab: 13 Kauj Ruam (nrog Duab)
Yuav Tsum Tshem Tawm Lub Khoos Phis Tawj Li Cas Nrog Cov Kauj Ruam Yooj Yim thiab Duab: Nov yog cov lus qhia txog yuav ua li cas tshem lub PC. Feem ntau ntawm cov khoom siv yooj yim yog hloov pauv thiab tshem tawm tau yooj yim. Txawm li cas los xij nws yog ib qho tseem ceeb uas koj tau koom nrog nws. Qhov no yuav pab tiv thaiv koj kom tsis txhob poob ib feem, thiab tseem ua rau kev rov ua dua tshiab
Web-based SmartMirror Siv Kev Sib Txuas Lus: 6 Kauj Ruam
Web-based SmartMirror Siv Kev Sib Txuas Lus: Cov lus qhia no tau xa nrog txhua txoj cai npaj siv. Kev txhim kho tau nyuaj heev tab sis ib zaug nws tau teeb tsa nws yooj yim heev rau kev kho tus kheej. Ua tib zoo saib thiab txaus siab;)
Tsheb kauj vab taug qab System nrog Tuag Tus Txiv Neej Alert Nrog Sigfox: 7 Cov Kauj Ruam (nrog Duab)
Tsheb kauj vab taug qab System Nrog Tuag Tus Txiv Neej Alert Nrog Sigfox: Kev ruaj ntseg rau cov neeg caij tsheb kauj vab nrog taug qab thiab xa cov yam ntxwv ceeb toom. Thaum muaj xwm txheej ceeb toom raug xa nrog GPS txoj haujlwm.Kev ruaj ntseg rau cov neeg caij tsheb kauj vab yog qhov yuav tsum tau, nrog kev tsheb kauj vab lossis tsheb kauj vab roob sib tsoo tshwm sim thiab sai li sai tau thaum muaj xwm txheej ceev