Cov txheej txheem:

Thauj Hnub thiab Sijhawm rau Blynk App Siv Wemos D1 Mini Pro: 10 Kauj Ruam
Thauj Hnub thiab Sijhawm rau Blynk App Siv Wemos D1 Mini Pro: 10 Kauj Ruam

Video: Thauj Hnub thiab Sijhawm rau Blynk App Siv Wemos D1 Mini Pro: 10 Kauj Ruam

Video: Thauj Hnub thiab Sijhawm rau Blynk App Siv Wemos D1 Mini Pro: 10 Kauj Ruam
Video: Наука о данных с Python! Анализ типов файлов от Avro до Stata 2024, Hlis ntuj nqeg
Anonim
Thawb Hnub thiab Sijhawm rau Blynk App Siv Wemos D1 Mini Pro
Thawb Hnub thiab Sijhawm rau Blynk App Siv Wemos D1 Mini Pro

Peb yuav siv Wemos D1 Mini Pro los thawb lub sijhawm & hnub tim rau Blynk App.

Koj yuav tsis tas yuav txuas ib qho khoom siv rau Wemos D1 Mini Pro rau qhov haujlwm no.

Kauj Ruam 1: Tsim Blynk Account

Tsim tus account Blynk
Tsim tus account Blynk

Tom qab koj rub tawm Blynk App, koj yuav tsum tsim tus lej Blynk tshiab. Tus lej no yog cais los ntawm tus as khauj siv rau Blynk Forums, yog tias koj twb muaj lawm. Peb pom zoo siv email chaw nyob tiag vim nws yuav yooj yim dua tom qab.

Vim li cas kuv thiaj yuav tsum tsim tus as khauj? Ib tus account xav tau los cawm koj cov phiaj xwm thiab muaj kev nkag tau los ntawm ntau yam khoom siv los ntawm txhua qhov chaw. Nws tseem yog kev ntsuas kev nyab xeeb. Koj ib txwm tuaj yeem teeb tsa koj tus kheej Blynk Server (Txuas mus rau lwm qhov chaw.) Txuas mus rau lwm qhov chaw. thiab muaj kev tswj hwm tag nrho.

Kauj Ruam 2: Tsim Txoj Haujlwm Tshiab

Tsim Txoj Haujlwm Tshiab
Tsim Txoj Haujlwm Tshiab

Tom qab koj tau ua tiav nkag mus rau koj tus as khauj, pib los ntawm kev tsim ib qhov haujlwm tshiab.

Kauj Ruam 3: Npe/Pawg Thawj Coj/Kev Sib Txuas

Lub Npe/Pawg Thawj Coj/Kev Sib Tham
Lub Npe/Pawg Thawj Coj/Kev Sib Tham

Muab nws lub npe thiab xaiv pawg tsim nyog (Wemos D1 Mini). Tam sim no nyem tsim.

Kauj ruam 4: Txoj Cai Pov Thawj

Txoj Cai Pov Thawj
Txoj Cai Pov Thawj

Koj daim ntawv pov thawj kev lees paub yuav raug email rau koj thiab koj tseem yuav tuaj yeem nkag mus rau nws hauv qhov chaw ntawm koj qhov project. Tus lej tshiab yuav raug tsim rau txhua qhov haujlwm koj tsim.

Kauj ruam 5: Xaiv Widgets

Xaiv Widgets
Xaiv Widgets
Xaiv Widgets
Xaiv Widgets

Ntxiv Widgets

Koj qhov phiaj xwm phiaj xwm tsis muaj dab tsi, cia peb ntxiv 3 lub cuab yeej - Ob Tus Nqi Zaub Widgets thiab Ib Lub Sij Hawm Tiag Tiag Widget. Coj mus rhaub qhov twg ntawm daim ntaub kom qhib lub thawv widget. Txhua qhov khoom siv muaj nyob ntawm no.

Kauj ruam 6: Widget Settings

Widget nqis
Widget nqis
Widget nqis
Widget nqis
Widget nqis
Widget nqis

Drag-n-Drop-Coj mus rhaub thiab tuav lub Widget kom rub nws mus rau txoj haujlwm tshiab.

Cov Chaw Cuam Tshuam - Txhua Tus Widget muaj nws tus kheej teeb tsa. Coj mus rhaub ntawm tus widget kom tau mus rau lawv. Teeb lawv nrog cov teeb tsa hauv qab no.

Nco tseg: Xaiv koj lub sijhawm nyob.

Kauj ruam 7: Khiav qhov Project

Khiav Txoj Haujlwm
Khiav Txoj Haujlwm

Thaum koj ua tiav nrog Chaw - nias lub khawm PLAY. Qhov no yuav hloov koj ntawm EDIT hom mus rau PLAY hom uas koj tuaj yeem cuam tshuam nrog kho vajtse. Thaum nyob hauv PLAY hom, koj yuav tsis tuaj yeem rub lossis teeb tsa cov cuab yeej tshiab, nias STOP thiab rov qab mus rau EDIT hom. Koj yuav tau txais cov lus hais tias "Arduino UNO offline". Peb yuav daws qhov ntawd hauv ntu tom ntej.

Kauj Ruam 8: Arduino Code

Arduino Txoj Cai
Arduino Txoj Cai

Tam sim no cia saib qhov piv txwv piv txwv rau Wemos D1 Mini Pro. Daim ntawv ceeb toom muaj peb ntu tseem ceeb uas koj yuav tsum suav nrog:

1. char auth = ""; Tshwj xeeb rau koj txoj haujlwm (Blynk App).

2. char ssid = ""; Tshwj xeeb rau lub network uas peb txuas nrog (lub npe network). Koj tuaj yeem "hotspot" los ntawm koj lub xov tooj thiab.

3. char pass = ""; Tshwj xeeb rau lub network peb txuas rau (password).

CODE

#define BLYNK_PRINT Serial

#include #include #include

#suav nrog

// Koj yuav tsum tau txais Auth Token hauv Blynk App. // Mus rau Qhov Chaw Haujlwm (icon txiv ntoo). char auth = ""; // Koj li ntawv pov thawj WiFi. // Teeb tus password rau "" rau qhib tes hauj lwm. char ssid = ""; char pass = ""; BlynkTimer timer; WidgetRTC rtc; Txoj hlua tam sim no; Txoj hlua currentDate; void teeb () {// Debug console Serial.begin (9600); // pinMode (LED, NTAWV); Blynk.begin (auth, ssid, dhau); // Pib synchronizing lub sijhawm rtc.begin (); // Zaub digital moos txhua txhua 10 vib nas this timer.setInterval (10000L, clockDisplay); } tsis muaj dab tsi voj () {Blynk.run (); timer.run (); } void clockDisplay () {// Koj tuaj yeem hu rau teev (), feeb (), … txhua lub sijhawm // Thov saib Lub Sijhawm piv txwv piv txwv kom paub meej tam sim noTime = hlua (teev ()) + ":" + feeb () + ": " + thib ob (); currentDate = Txoj hlua (hnub ()) + "" + hli () + "" + xyoo (); Serial.print ("Lub sijhawm tam sim no:"); Serial.print (currentTime); Serial.print (""); Serial.print (Hnub tim tam sim no); Serial.println (); // Xa sijhawm rau App Blynk.virtualWrite (V1, currentTime); // Xa hnub tim rau App Blynk.virtualWrite (V2, currentDate); }

Kauj Ruam 9: Txheeb xyuas APP kom pom Cov txiaj ntsig

Txheeb xyuas APP kom pom Cov txiaj ntsig
Txheeb xyuas APP kom pom Cov txiaj ntsig

Rov qab mus rau Blynk App thiab txheeb xyuas koj daim ntawv kawm tiav. Koj yuav tsum pom hnub tim & sijhawm tam sim no.

Nco tseg: Kuv muaj sijhawm teem sijhawm hloov tshiab txhua 10 vib nas this.

Kauj ruam 10: Yees duab

Nco tseg: Kuv muaj lub sijhawm teeb tsa hloov tshiab txhua 10 vib nas this.

Pom zoo: