Cov txheej txheem:

Wi-nkaus Pab Yuav luag Txhua Yam: 4 Kauj Ruam
Wi-nkaus Pab Yuav luag Txhua Yam: 4 Kauj Ruam

Video: Wi-nkaus Pab Yuav luag Txhua Yam: 4 Kauj Ruam

Video: Wi-nkaus Pab Yuav luag Txhua Yam: 4 Kauj Ruam
Video: "Cim Kuv Cia" Jeeker Her | Cover by Zuag Paj Xyooj (Live Session Ver.) 2024, Hlis ntuj nqeg
Anonim
Wi-nkaus Pab Yuav luag Txhua Yam
Wi-nkaus Pab Yuav luag Txhua Yam
Wi-nkaus Pab Yuav luag Txhua Yam
Wi-nkaus Pab Yuav luag Txhua Yam
Wi-nkaus Pab Yuav luag Txhua Yam
Wi-nkaus Pab Yuav luag Txhua Yam

Yog tias koj tsis tau siv Blynk ua ntej, koj yuav tsum txheeb xyuas nws. Qhov kev tsim no tuaj yeem siv rau ntau yam - tsis yog lub teeb lava. Koj tuaj yeem ua kom nws tig koj lub tshuab kas fes thaum sawv ntxov lossis ua lub teeb hmo ntuj tsis siv neeg. Txawm li cas los xij, Kuv tsuas yog ua kom lom zem.

Kauj ruam 1: Teem App

Teem App
Teem App
Teem App
Teem App

Rau txoj haujlwm no koj yuav tsum muaj ob qho Arduino IDE ntawm koj lub computer, thiab Blynk app ntawm lub xov tooj ntse lossis ntsiav tshuaj.

Nplooj ntawv no muaj cov ntaub ntawv hais txog yuav ua li cas thiaj teeb tsa koj tus kheej. (Yog tias koj tau siv Blynk ua ntej ces koj tuaj yeem hla qhov kauj ruam no.)

Thaum koj tau txais kev nkag siab ntawm lub app, ua raws cov theem no los teeb tsa koj txoj haujlwm.

  1. Qhib lub thawv widget (+ icon)
  2. Ntxiv ib lub pob
  3. Teem lub khawm tus pin rau V0, thiab lwm ob lub thawv rau 0 thiab 180 (hauv qhov kev txiav txim ntawd).

Kauj Ruam 2: Teeb Tus Ntaus

Kuv tab tom siv SparkFun Blynk Board, tab sis koj tuaj yeem siv tau ib qho cuab yeej siv Blynk. Yog tias koj siv Blynk Board, tom qab ntawd SparkFun muaj cov lus qhia txog yuav ua li cas thiaj teeb tsa nws thiab pib ua. Qhov txuas thib ob yog hais txog yuav teeb tsa koj lub rooj tsav xwm li cas txhawm rau kho nws cov cai hauv Arduino qhov chaw ua haujlwm ib puag ncig. (dua yog tias koj twb paub lawm tias koj tab tom ua dab tsi, koj tuaj yeem hla cov no):

  • https://learn.sparkfun.com/tutorials/getting-star…
  • https://learn.sparkfun.com/tutorials/blynk-board-a…

Yog tias koj tau ua tiav qhov no, ntawm no yog tus lej koj yuav tsum siv:

/*Koj yuav tsum tau hloov peb yam no nrog koj tus kheej cov ntaub ntawv: char BlynkAuth = "yourauthcode" char WiFiNetwork = "yourwifinetworkname" char WiFiPassword = "yourwifipassword"*/

#suav nrog Servo myservo;

#ncig #ncig

#define BLYNK_PRINT Serial

char BlynkAuth = "yourauthcode"; char WiFiNetwork = "yourwifinetworkname"; char WiFiPassword = "yourwifipassword";

teeb tsa tsis muaj dab tsi () {Serial.begin (9600); myservo.attach (12); Blynk.begin (BlynkAuth, WiFi Network, WiFiPassword);}

lub voj void () {Blynk.run ();}

BLYNK_WRITE (V0) {int pinData = param.asInt (); myservo.write (pinData);}

Kauj Ruam 3: Tsim Kev Tiv Thaiv

Tsim Kev Tiv Thaiv
Tsim Kev Tiv Thaiv
Tsim Kev Tiv Thaiv
Tsim Kev Tiv Thaiv
Tsim Kev Tiv Thaiv
Tsim Kev Tiv Thaiv
Tsim Kev Tiv Thaiv
Tsim Kev Tiv Thaiv

Hloov chaw siv qee yam nyuaj dua li kev xa rov qab, Kuv tau ua qhov sib piv yooj yim: rau qhov no koj tuaj yeem tuaj yeem yuav lub plug-in-switch zoo li ib qho hauv daim duab tsuas yog siv cov phab ntsa hloov (rau koj lub teeb lub tsev). Kuv siv lub cav loj servo, qee lub tshuab popsicle, rab phom kub, thiab qee cov khoom ua si yas los tsim cov pov thawj ntawm lub tswv yim rau txoj haujlwm no uas tuaj yeem ua haujlwm tau yooj yim.

Kauj Ruam 4: Muab tag nrho ua ke

Muab Tso Ua Ke
Muab Tso Ua Ke
Muab Tso Ua Ke
Muab Tso Ua Ke
Muab Tso Ua Ke
Muab Tso Ua Ke

Lub teeb lava (lossis lwm yam khoom siv) yuav tsum tau ntsaws rau hauv qhov hloov hluav taws xob uas ua haujlwm los ntawm servo lub cev muaj zog uas xav tau txuas nrog lub rooj tsav xwm blynk, thiab pawg thawj coj xav tau lub zog.

  1. Kuv siv lub xov tooj them nyiaj thiab lub usb qaum los muab lub zog
  2. Cov xov hluav taws xob tau txuas nrog raws li hauv qab no: liab rau Vin, dub rau Gnd, thiab daj rau tus pin 12
  3. Txuas txhua yam rau hauv lub qhov hluav taws xob phab ntsa
  4. Siv blu -tac kom ua tej yam los ntawm kev phom sij - tshwj tsis yog koj tsis mloog nws
  5. Lub tshuab servo xav tau los ntsuas tus kheej: sim hauv lub app kom paub seb tus lej twg yuav tsum tau teeb tsa hauv lub khawm widget (hloov 0 thiab 180) kom ua tiav tswj lub teeb hloov.

Qhib lub app thiab qhib txhua yam kom muab nws sim. Koj tseem tuaj yeem sim siv lub tshuab nws tus kheej los ntawm kev siv qee qhov app lwm cov cuab yeej zoo li GPS lossis lub sijhawm.

Nco ntsoov tawm tswv yim nrog cov lus nug thiab tshuaj xyuas qhov project's page!

Pom zoo: