Cov txheej txheem:

Ntse Dej: 6 Kauj Ruam (nrog Duab)
Ntse Dej: 6 Kauj Ruam (nrog Duab)

Video: Ntse Dej: 6 Kauj Ruam (nrog Duab)

Video: Ntse Dej: 6 Kauj Ruam (nrog Duab)
Video: Tseem Ev Lub Kawm - Koos Loos 2024, Kaum ib hlis
Anonim
Image
Image

Hauv qhov kev qhia ua haujlwm ntawm Arduino no peb yuav kawm paub yuav ua li cas thiaj ua Smart Watering

Kauj Ruam 1: Yuav Tsum Kho Vajtse

Kev sib txuas
Kev sib txuas

Arduino Board -

Arduino Ethernet Shield -

Av noo noo Sensor -

Solenoid Valve Flow Switch 1/2 -

Dej Flow Sensor 1/2 -

DHT11 Module -

Tshaj tawm -

Kauj ruam 2: Kev sib txuas

Kev sib txuas
Kev sib txuas
Kev sib txuas
Kev sib txuas

Kauj ruam 3: Source Code

Qhov Code
Qhov Code

Nov yog cov cai ntawm caj npab uas mus hauv Arduino - Tau Code

Kauj ruam 4: Tsim Webserver

Tsim lub vev xaib
Tsim lub vev xaib

Neeg rau zaub mov Script

? php // Kev sib txuas Database

$ koneksi = mysqli_connect ("krstudio.web.id", "username", "password", "database") lossis tuag ("yuam kev".mysqli_error ($ koneksi)); // Nqa cov ntaub ntawv cov ntaub ntawv ntawm database MySQL $ sql = "SELECT * FROM tsev xog paj ORDER BY id DESC LIMIT 30"; $ tshwm sim = mysqli_query ($ koneksi, $ sql) lossis tuag ("Yuam Kev Xaiv". mysqli_error ($ koneksi)); // Ua array $ greenh = array (); thaum ($ kab = mysqli_fetch_assoc ($ tshwm sim)) {$ greenh = $ kab; } // Zaub hloov pauv cov ntaub ntawv daim ntawv tus kheej rau hom JSON echo json_encode ($ greenh); // kaw qhov txuas db txuas mysqli_close ($ koneksi); // refresh 11 thib ob?>

?>

Kauj ruam 5: Tau Daim Ntawv Thov

Tau Daim Ntawv Thov
Tau Daim Ntawv Thov

Cov ntaub ntawv ntawm lub app muaj nyob ntawm - Google Playstore

Kauj Ruam 6: Xeem

Tam sim no peb ua tiav txhua qib thiab ua SmartWatering

koj tuaj yeem tswj hwm siv koj lub smartphone.

Tsaug rau saib.

Pom zoo: