Cov txheej txheem:
- Kauj Ruam 1: Tsim Circuit Court
- Kauj Ruam 2: Kho kom raug thiab xa daim Sketch mus rau Node MCU
- Kauj ruam 3: Database thiab Web Files
- Kauj Ruam 4: Qhov Ua tiav
Video: Nkag Mus Cov Ntaub Ntawv thiab Npaj Cov Duab Online Siv NodeMCU, MySQL, PHP thiab Chartjs.org: 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Cov Lus Qhia no piav qhia yuav ua li cas peb tuaj yeem siv Node MCU pawg thawj coj los sau cov ntaub ntawv los ntawm ntau lub ntsuas, xa cov ntaub ntawv no mus rau tus tswv PHP cov ntaub ntawv uas tom qab ntawd ntxiv cov ntaub ntawv mus rau MySQL database. Cov ntaub ntawv tuaj yeem pom hauv online ua daim duab, siv chart.js.
Kev paub pib ntawm PHP thiab MySQL yuav xav tau rau txoj haujlwm no thiab koj yuav xav tau nkag mus rau lub vev xaib nrog cov teeb tsa no kom tuaj yeem tsim thiab saib koj tus kheej cov duab. Kuv kuj tseem xav tias koj muaj kev paub yooj yim ntawm kev siv Node MCU board thiab xa cov duab kos rau nws. (Kuv siv Arduino IDE rau qhov no)
Kauj Ruam 1: Tsim Circuit Court
Raws li Node MCU tsuas muaj ib tus lej sib piv peb yuav siv ntau txoj hauv kev kom tuaj yeem nyeem cov ntaub ntawv los ntawm ntau lub ntsuas. (Ib tus lej ntawm cov ntawv qhia qhia txog lub tswv yim no kom ntxaws yog li kuv yuav tsis nkag mus rau qhov ntawd). Hauv qhov piv txwv no kuv tau siv ob lub ntsuas hluav taws xob (rau lub teeb thiab qhov kub thiab txias) tab sis koj tuaj yeem hloov pauv qhov no mus rau qhov koj xav tau thiab ntxiv cov ntsuas ntxiv yog tias xav tau. Kuv tau siv lub teeb pom kev tiv taus, lub ntsuas cua sov, ob lub diodes kho, 330 ohm resistor thiab 10K resistor thiab ob peb jumper xov hlau. Daim duab Fritzing txuas nrog qhia tau hais tias txhua yam no tau sib txuas ntawm lub khob cij.
Kauj Ruam 2: Kho kom raug thiab xa daim Sketch mus rau Node MCU
Siv cov ntawv txuas no.ino. Koj yuav tsum tau kho qhov no nrog koj tus kheej lub network WiFi npe thiab tus lej cim kom Node MCU tuaj yeem txuas rau koj lub network.
Hauv qab ntawm qhov kos duab kab no 'ncua (60000);' muab ib feeb qeeb ntawm kev nyeem ntawv sensor tab sis qhov no tuaj yeem hloov kho kom haum rau koj tus kheej xav tau. Kuv xav kom tawm tsawg kawg 10 vib nas this los tso cai rau txuas rau 'updater.php' cov ntaub ntawv txhua lub sijhawm.
Koj tseem yuav tau hloov kho txoj hauv kev uas koj yuav tau txais ob lub.php cov ntaub ntawv thiab ob daim ntawv javascript uas xav tau. Koj tuaj yeem rub tawm cov no hauv cov kauj ruam tom ntej.
Kauj ruam 3: Database thiab Web Files
Tsim koj li MySql databse. Tsim lub rooj hu ua 'temp_light' (koj tuaj yeem hloov qhov no tab sis yuav xav tau kho ob daim php cov ntaub ntawv kom pom qhov hloov pauv uas koj ua). Muab lub rooj plaub teb. Thawj qhov pib nce qib teb. Ib qhov chaw hu ua 'temp', thaj teb uas hu ua 'lub teeb' thiab daim teb hu ua 'date_time' uas yuav yog lub sijhawm cim thiab tus nqi pib 'CURRENT_TIMESTAMP'
Tam sim no rub tawm cov ntawv txuas.zip thiab unpack nws. Qhov no yuav muab koj ob daim ntawv php thiab daim nplaub tshev hu ua 'ntawv' uas muaj rau.js cov ntaub ntawv uas kuv tau txais los ntawm chartjs.org. Ob qhov.js cov ntaub ntawv tsis tas yuav raug kho thiab 'cov ntawv sau' yuav tsum tau tuav hauv tib qhov chaw zoo li koj ob daim ntawv php. ob php cov ntaub ntawv yuav ob qho yuav tsum tau kho nrog koj tus kheej databse lub npe, tus password thiab tus tswv tsev IP chaw nyob
Hauv cov ntawv index.php koj yuav pom kab 50: $ adjustable_temp = ($ temp*0.0623);
Qhov kev suav no yog hloov pauv kev nyeem ntawv rau qhov kub kom ze li kuv tuaj yeem tau txais qib centigrade thiab tau tuaj txog ntawm kev sim thiab ua yuam kev thiab yuav luag yuav tsum tau hloov kho kom haum rau koj tus kheej qhov ntsuas kub.
Tam sim no tuav ob lub php cov ntaub ntawv thiab cov ntawv 'ntawv' uas muaj ob.js cov ntaub ntawv tag nrho ua ke hauv tib cov npe. Xauj mus rau phau ntawv ntawd thiab koj yuav tsum pom koj tus kheej daim duab nrog cov ntaub ntawv xa los ntawm koj li Node MCU pawg thawj coj.
Kauj Ruam 4: Qhov Ua tiav
Kuv xub tsim qhov haujlwm no nyob ib puag ncig ob xyoos dhau los tab sis tsis tau muaj ib puag ncig los sau cov lus qhia rau nws txog tam sim no. Koj tuaj yeem pom daim duab tsim los ntawm kuv qhov kev xeem ntawm no:
Qhov loj loj nyob hauv kab ntawv yog qhov uas lub hnub ci los ntawm lub qhov rais mus rau ob lub ntsuas thiab qhov poob qis dua yog thaum lub hnub maj mam tawm mus.
Pom zoo:
RAWS LI COV NTAUB NTAWV NTSEEG NTAWV NTAWV MUAJ NTAWV TSHUAJ NTAWV TSO CAI RAU RASPBERRY PI: 6 Kauj Ruam (nrog Duab)
RAWS LI COV NTAUB NTAWV NTAWV MUAJ NTAWV TSHUAJ NTXIV RAU RASPBERRY PI: Hauv qhov haujlwm no, peb yuav txuas peb ntawm Atlas Scientific's EZO sensors (pH, yaj cov pa thiab kub) mus rau Raspberry Pi 3B+. Hloov chaw ntawm txuas cov kab hluav taws xob mus rau Raspberry Pi, peb yuav siv Whitebox Labs Tentacle T3 daim ntaub thaiv. T
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: 6 Cov Kauj Ruam
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: Lub Hom Phiaj: Txhim kho cov cuab yeej cuab tam thiab rov ua dua cov ntsiav kom ntxig USB Ethernet CDC Gadget txhawb nqa; Rov tsim boot.img los ntawm Linaro rau khau raj USB Ethernet CDC; Tsim NFS server los tuav lub hauv paus cov ntaub ntawv system; IP teeb tsa hauv DEVICE thiab HOST
Yuav Ua Li Cas Thiaj Nkag Dvd Cov Ntaub Ntawv kom Ruaj Ntseg Tseg Koj Cov Ntaub Ntawv: 8 Kauj Ruam
Yuav Ua Li Cas Thiaj Nkag Dvd Cov Ntaub Ntawv kom Ruaj Ntseg Koj Cov Ntaub Ntawv.: Kuv pom qhov no yog txoj hauv kev yooj yim heev los ua encrypted dvd zoo heev rau kev ruaj ntseg rau koj cov ntaub ntawv.Kuv siv PGP desktop los ua ENCRYPTED VIRTUAL DRIVER (EVD). Nco tseg: PGP desktop tsis yog lub freeware koj xav tau yuav lub software tech-piersrsr Tom qab koj teeb tsa
Luam thiab Muab Tshuaj txhuam thiab Nkag Mus Siv Cov Ntaub Ntawv Ntawm Ntau Lub Computer: 3 Kauj Ruam
Luam thiab Muab Tshuaj txhuam thiab Nkag Mus Siv Cov Ntaub Ntawv Ntawm Ntau Lub Computer: Kuv nyuam qhuav pom lub vev xaib uas tso cai rau tib neeg los luam thiab muab cov ntawv, duab, yeeb yaj kiab, thiab lwm yam nruab nrog ntau lub khoos phis tawj. Nws tseem tso cai rau koj los tsim cov lus hais lus, upload cov ntaub ntawv, thiab luam koj lub vev xaib. Thiab qhov zoo tshaj plaws yog, koj tsis txawm muaj
Xav Geek Hacks Kev Nkag Mus Nkag Nkag - Rov Siv Lub Raj Dej Tshuaj Kho Mob: 9 Kauj Ruam
Xav Geek Hacks Kev Sib Tw Nkag Nkag - Rov Siv Lub Raj Dej Hau Kev Noj Qab Haus Huv: Nov yog qhov kuv nkag mus rau hauv Think Geek Hacks Contest. Kuv txiav txim siab sim thiab rov siv lub raj mis Health Potion Zog haus. Nws tuaj yeem siv los ua tus txhawb nqa hauv lub luag haujlwm ua si lossis ua kom zoo nkauj zoo nkauj. Kuv tsim lub teeb pom kev yooj yim tso rau hauv lub raj mis kom pom nws