Cov txheej txheem:

Ntse Tsev Nrog Arduino MKR1000 thiab MIT Android App: 4 Kauj Ruam
Ntse Tsev Nrog Arduino MKR1000 thiab MIT Android App: 4 Kauj Ruam

Video: Ntse Tsev Nrog Arduino MKR1000 thiab MIT Android App: 4 Kauj Ruam

Video: Ntse Tsev Nrog Arduino MKR1000 thiab MIT Android App: 4 Kauj Ruam
Video: Qhia hau khaub poob thiab ua khaub poob kua ntses 8/19/2020 2024, Kaum ib hlis
Anonim
Ntse Tsev Nrog Arduino MKR1000 thiab MIT Hauv App
Ntse Tsev Nrog Arduino MKR1000 thiab MIT Hauv App

Hauv qhov kev qhia no kuv piav qhia yuav ua li cas txhawm rau txhim kho koj lub tsev ntse nrog tsuas yog qee yam khoom siv.

Lub plawv ntawm lub tsev ntse tsim no yog Arduino MKR1000 pawg thawj coj, tswj hwm nrog app, tsim los ntawm kev txhim kho lub vev xaib ntawm M. I. (Massachusetts Institute of Technology).

Nws ua tiav li cas? Ntawm lub vev xaib los ntawm M. I. T. koj tuaj yeem nkag mus nrog koj tus lej google los tsim ib qho app rau Android smartphone koj tus kheej. Koj tuaj yeem txhais cov ntxaij vab tshaus thiab ua haujlwm txhua qhov lus txib hauv qab. Qhov kawg tau ua tiav nrog WYSIWYG kom meej (qhov koj pom yog qhov koj tau txais) pom cov lus programming nrog cov haujlwm ua haujlwm.

Kuv tau ua app los tswj Arduino MKR1000 pawg thawj coj ntawm WiFi nrog 5 qhov sib txawv tso tawm kom hloov 5 yam khoom sib txawv hauv "tsev ntse". Thaum pib, tsuas yog LEDs txuas nrog, tab sis lawv tuaj yeem hloov pauv tau yooj yim los ntawm kev hloov chaw xa mus txuas rau cov khoom siv hauv tsev.

Khoom siv

1 Arduino pawg thawj coj saib hom MKR1000, 7 tus tiv thaiv 1kOhm.7 coj 5 hli, xim sib txawv.

5V DC xa tawm ib qho hauv ib daim ntawv thov hauv tsev.

5V Dc fais fab mov rau MKR1000 (phab ntsa wart USB khoom yuav ua).

PC nrog Arduino IDE software teeb tsa.

Kauj ruam 1: Demo

Image
Image
Arduino Ino Program
Arduino Ino Program

Ntawm no koj tuaj yeem pom yuav ua li cas 5 qhov sib txawv tso tawm nrog LEDs tau qhib thiab tawm. Koj kuj tau teeb tsa lub vijtsam tau pom, koj tuaj yeem xaiv tus lej ntawm cov nyees khawm uas siv lub npov. (yam tsawg kawg ib lub pob, ntau tshaj tsib lub nyees khawm).

Cov nyees khawm yog ntsuab thaum cov LEDs tuaj yeem hloov ON thiab tig mus liab yog tias cov LEDs tuaj yeem hloov OFF. A tom qab kaw lub app cov xwm txheej ntawm txhua lub khawm raug khaws cia hauv lub cim xeeb.

Muaj ob lub LEDs ntxiv, ib qho dawb qhia MKR1000 tab tom tshawb nrhiav qhov tseeb WiFi channel thiab ib qho xiav qhia qhov kev sib txuas tau tsim thiab ua tiav. Qhov no yuav siv appr. 20 vib nas this tom qab fais fab tuag.

Thaum WiFi poob qis, MKR1000 yuav pib tshawb nrhiav txuas ntxiv.

Kauj Ruam 2: Qhov Arduino Ino Program

Arduino Ino Program
Arduino Ino Program

Arduino MKR1000 xav tau ib txoj haujlwm los ua haujlwm nrog app los ntawm M. I. T. Nws yog qhov txuas ntxiv thiab txhim kho cov haujlwm uas tau piav qhia hauv Agus Kurniawan qhov kev tshaj tawm "Arduino thiab Genuino MKR1000 Rhiav Kev Txhim Kho 2016".

Rub tawm cov ntawv, luam cov ntawv mus rau Arduino IDE thiab tom qab ntawd rub qhov program rau hauv koj li Arduino MKR1000. Saib www.arduino.cc rau kev piav qhia txog kev teeb tsa thiab siv cov software tsim nyog thiab kev tsim kho Arduino. Ua ntej rub lub program rau hauv MKR1000, xub hloov qhov "xxx" qhov tseem ceeb nrog koj (zais zais) cov lej rau koj li WiFi network hauv koj lub tsev ntse.

Yog tias koj tsis tau npaj ua ntej MKR1000, koj yuav tsum xub ua MKR1000 pom hauv IDE. MKR1000 tsis suav nrog tus qauv. Ua ntej teeb tsa qhov xav tau "Wifi101 ″ lub tsev qiv ntawv. Txhawm rau ua qhov no, mus rau "cov cuab yeej/tswj cov tsev qiv ntawv" thiab xaiv WiFi101 lub tsev qiv ntawv. Kauj ruam kawg yog ntxiv rau pawg thawj coj saib MKR1000. Txhawm rau ua qhov no, mus rau "cov cuab yeej/pawg thawj coj/Tus Thawj Saib Xyuas". Los ntawm cov npe ntawm cov laug cam, nrhiav "Arduino SAMD Boards (32-ntsis ARM Cortex-M0 +)". Nyem rau ntawm "Cov ntaub ntawv ntau ntxiv" thiab "teeb tsa" los teeb tsa lub rooj tsavxwm no.

Kauj Ruam 3: M. I. T. App Tsim

M. I. T. Ua App Tsim
M. I. T. Ua App Tsim
M. I. T. Ua App Tsim
M. I. T. Ua App Tsim
M. I. T. Ua App Tsim
M. I. T. Ua App Tsim

Ntawm lub vev xaib los ntawm M. I. T. koj tuaj yeem nkag mus nrog koj tus lej google los tsim ib qho app rau Android smartphone koj tus kheej. Koj tuaj yeem txhais cov ntxaij vab tshaus thiab ua haujlwm txhua qhov lus txib hauv qab. Qhov tom kawg yog ua tiav nrog qhov tseeb WYSIWYG (qhov koj pom yog qhov koj tau txais) pom cov lus programming nrog cov haujlwm ua haujlwm.

Kuv qhov program hauv Android tuaj yeem pom nyob hauv cov duab ntawm M. I. T. kev txhim kho lub vev xaib Nkag mus thiab tshawb rau "MKR1000" thiab rub tawm qhov hloov tshiab tshaj tawm "MKR1000_V4_Control". Koj yuav tau txais daim ntawv theej ntawm koj tus kheej nplooj ntawv txhim kho koj tuaj yeem saib thiab hloov lossis txhim kho.

Yog tias koj xav sim ua Android cov ntawv ua tiav (APK cov ntaub ntawv) yam tsis tau nkag mus rau hauv MIT lub vev xaib koj tuaj yeem rub tawm cov ntawv ncaj qha ntawm no thiab luam thiab nruab nws ntawm koj lub xov tooj smartphone.

The M. I. T. lub vev xaib tau ntim nrog cov lus qhia, pib qhia thiab lub rooj sib tham loj. Koj tuaj yeem kawm paub ua haujlwm ib qib zuj zus, tsim koj lub xov tooj screen thiab txhua qhov thaiv uas tswj cov nyees khawm.

ceeb toom tseem ceeb: thaum koj lub app tau npaj yuav raug teeb tsa, luam nws rau koj lub xov tooj thiab nyem ob zaug ntawm apk cov ntaub ntawv. Tsuas yog tsis quav ntsej lawv, qhov laj thawj tseem ceeb yog tias koj rub tawm app sab nraum lub khw app raug cai …

Kauj Ruam 4: Cov Khoom Siv Hauv Tsev

Khoom Siv Hauv Tsev
Khoom Siv Hauv Tsev
Khoom Siv Hauv Tsev
Khoom Siv Hauv Tsev

Hloov chaw ntawm LEDs koj tuaj yeem txuas me me 5V DC txuas mus hloov khoom siv hauv tsev. Cov no txhua tus txuas nrog rau qhov txaus ntshai hluav taws xob (110 V AC lossis ntau dua) yog li ceev faj thiab ua haujlwm nyab xeeb.

Cov xa tawm lawv tus kheej xav tau lub zog, yog tias koj teeb tsa tag nrho 5 qhov xa tawm Kuv hais kom siv cais 5 V DC muab rau kev xa tawm. Lwm qhov MKR1000 5VDC kev txuas yuav dhau mus.

Pom zoo: