Cov txheej txheem:

Tswj Buzzer thiab Coj Los Ntawm Android Siv Blynk: 4 Cov Kauj Ruam
Tswj Buzzer thiab Coj Los Ntawm Android Siv Blynk: 4 Cov Kauj Ruam

Video: Tswj Buzzer thiab Coj Los Ntawm Android Siv Blynk: 4 Cov Kauj Ruam

Video: Tswj Buzzer thiab Coj Los Ntawm Android Siv Blynk: 4 Cov Kauj Ruam
Video: Yuav Ua Li cas Plab Thiaj Tsis Rog 2024, Kaum ib hlis
Anonim
Tswj Buzzer thiab Coj Los Ntawm Android Siv Blynk
Tswj Buzzer thiab Coj Los Ntawm Android Siv Blynk

Hauv cov lus qhia no kuv yuav qhia koj li cas txuas rau arduino rau hauv xov tooj ntawd siv bluetooth rau GUI thiab IOT

Hauv qhov kev qhia no, peb yuav siv lub xov tooj hauv xov tooj thiab app blynk (ib qho ntawm qhov kev xaiv GUI zoo tshaj plaws rau arduino) tig rau LED thiab tswj lub suab nrov siv pwm

Ntawm no nws ua haujlwm li cas,

Peb yuav txuas tus arduino rau hauv xov tooj ntawd siv bluetooth

Peb yuav teeb tsa lub interface ntawm blynk app

Nias LED ntawm app yuav tsum qhib LED ON

Thiab kho vtg ntawm buzzer ntawm app yuav tsum muab cov khoom sib npaug ntawm arduino

Kauj Ruam 1: Qhov Yuav Tsum Tau

Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau

1. Arduino Uno X 1

2. HC-05 Bluetooth module X1

3. Jumper Hlau X 6-10

4. Buzzer X 1

5. Coj X 1

Kauj ruam 2: Teeb

Teeb
Teeb

HC 05 Bluetoot module…

Qhov Module Ardduino

Vc5v wb

GND GND

Tx digital pin 10.

Rx Digital pin 11

Buzzer

module Arduino

+tus lej digital 3

-ib Gnd

LED teeb

module Arduino

+tus lej digital 13

-ib Gnd

Kauj ruam 3: Blynk Teeb

Blynk teeb tsa
Blynk teeb tsa
Blynk teeb tsa
Blynk teeb tsa
Blynk teeb tsa
Blynk teeb tsa
  1. Mus rau PlayStore los ntawm koj lub xov tooj Android thiab rub tawm thiab nruab blynk app.
  2. Qhib Blynk app.
  3. Sau npe/Sau npe.
  4. Tam sim no Nyem rau Tsim qhov haujlwm tshiab
  5. Poject lub npe - "Muab koj lub npe lub npe" (Piv txwv li kuv hu nws "BlueBuzz")
  6. Xaiv lub cuab yeej - "Arduino UNO"
  7. Hom Kev Sib Txuas - "Bluetooth"
  8. Tam sim no nyem "Tsim"
  9. Sai li koj nyem "Tsim", ib lub mail hu ua "dispatcher" tau xa tuaj rau koj los ntawm qhov ntsais.
  10. qhib mail thiab luam "Auth token".
  11. Tam sim no mus ntsib blynk lub vev xaib.
  12. Tam sim no muaj koj yuav pom "Rub lub tsev qiv ntawv blynk". Tam sim no nyem rau nws ua raws cov lus qhia thiab rub tawm blynk lub tsev qiv ntawv.
  13. Tam sim no rho tawm lub tsev qiv ntawv rub tawm thiab luam nws mus rau C: / Program Files (x86) Arduino / libraries. (Hauv tus tsav uas koj tau teeb tsa software arduino, nyob ntawd koj yuav pom daim nplaub tshev hu ua "tsev qiv ntawv" tsis yog "lib" muab lub tsev qiv ntawv tso rau hauv "Tsev qiv ntawv" nplaub tshev.)
  14. Tam sim no rov mus xyuas blynk lub vev xaib.
  15. Hauv qab "Flash" koj yuav pom "Sketch Builder", nyem rau ntawm "Sketch Builder", Ntawm sab laug koj yuav pom …

-Pawg = Arduino

Kev sib txuas = HC05/HC06

-Example = GettingStarted/BlynkBlink

16. Tam sim no luam qhov piv txwv thiab muab tso rau hauv arduino IDE.

17. Tam sim no muab tshuaj txhuam "Auth Token" (xa los ntawm blynk) nyob rau hauv qhov chaw ntawm "Koj Tus Neeg Sau Npe" thiab tshem cov dhia tawm ntawm tus pin 10 thiab 11

los ntawm arduino thiab xa cov cai rau board.

Tam sim no koj cov arduino tau teeb tsa los ua cov lus qhia los ntawm app. Tam sim no cia tsim tus interface hauv app.

Kauj Ruam 4: Tsim Kev Sib Tham hauv App

Tsim Kev Sib Tham hauv App
Tsim Kev Sib Tham hauv App
Tsim Kev Sib Tham hauv App
Tsim Kev Sib Tham hauv App
Tsim Kev Sib Tham hauv App
Tsim Kev Sib Tham hauv App
  • Nyem rau ntawm "ntxiv widget" (+) thiab xaiv lub pob.
  • tam sim no nyem rau khawm.
  • Muab lub npe rau khawm hais "coj".
  • hauv qab OUTPUT tab…

- nyem tus pin thiab xaiv tus pin uas coj yog txuas nrog arduino, ntawm no nws yog tus lej digital 13, yog li xaiv cov digital thiab hauv qab tus pin D13. Thiab Nyem txuas ntxiv.

hauv qab MODE tab…

- xaiv seb koj puas xav tau lub pob no ua "khawm thawb" lossis "Hloov". (Lo nrog "hloov" rau lub hom phiaj ntawm qhov kev qhia no)

  • nyem rov qab.
  • Nyem rau ntawm "ntxiv widget" (+) thiab xaiv "Slider".
  • Nyem rau ntawm "Slider".

- Npe lub slider hais "buzzer"

- Hauv qab OUTPUT tab …

Xaiv tus pin tsis muaj tus buzzer txuas nrog arduino, ntawm no nws yog tus lej digital D3. Nyem "txuas ntxiv".

- hauv qab xa ON RELEASE tab …

teeb nws rau OFF

- nyem rov qab.

  • Nyem rau ntawm "ntxiv widget" (+) thiab xaiv "Bluetooth".
  • Tam sim no kaw lub app.
  • Tam sim no fais fab koj Arduino (koj yuav tsum pom lub teeb liab ntsais ntawm bluetooth module thiab xyuas kom tseeb tias koj tau txuas dua cov neeg dhia mus rau tus pin 10 thiab 11)
  • Qhib bluetooth ntawm koj lub xov tooj thiab tshawb rau "HC-05", tam sim no khub lub cuab yeej nrog tus yuam sij pib "1234".
  • Tom qab ua tiav kev sib tw. Qhib Blynk app, xaiv qhov haujlwm koj tau tsim xaiv bluetooth.
  • coj mus rhaub txuas "bluetooth ntaus ntawv" ntawm no koj yuav tsum pom "HC 05" xaiv nws.
  • tam sim no koj yuav tsum pom #HC-05 txuas nrog. thiab tam sim no ntaus rov qab.
  • Tam sim no hauv rt feem ntau koj yuav tsum pom "ua si" khawm nyob ib sab rau "Ntxiv widget", ntaus "ua si"
  • Tam sim no nias coj nws yuav tsum tig rau coj thiab txav tus swb raws li buzzer yuav tsum suab.

Pom zoo: