Cov txheej txheem:

MKR1000 IoT Client/server Kev Sib Txuas Lus: 4 Cov Kauj Ruam
MKR1000 IoT Client/server Kev Sib Txuas Lus: 4 Cov Kauj Ruam

Video: MKR1000 IoT Client/server Kev Sib Txuas Lus: 4 Cov Kauj Ruam

Video: MKR1000 IoT Client/server Kev Sib Txuas Lus: 4 Cov Kauj Ruam
Video: Электронная почта с помощью Python 2024, Kaum ib hlis
Anonim
MKR1000 IoT Client/server Kev Sib Txuas
MKR1000 IoT Client/server Kev Sib Txuas
MKR1000 IoT Client/server Kev Sib Txuas
MKR1000 IoT Client/server Kev Sib Txuas

Txoj haujlwm no piav qhia yuav teeb tsa ob lub Arduino/Genuino MKR1000 li cas rau cov neeg siv khoom thiab cov neeg siv khoom.

Tus neeg siv MKR1000 yuav txuas rau koj lub wifi hauv zos thiab mloog ob lub tswv yim txuas nrog lub cev nrog tus neeg siv khoom; ib qho los ntawm lub pob thiab lwm qhov los ntawm lub ntsuas kev co.

Ntawm kev nkag siab cov tswv yim tus neeg siv khoom MKR xa GET thov mus rau tus neeg rau zaub mov MKR. Thaum tau txais GET thov, tus neeg rau zaub mov MKR tau teeb tsa los qhib/tua lub teeb hauv LED (ua los ntawm cov neeg siv khawm) thiab kom ploj mus thiab nqis ib qho LED txuas (ua los ntawm kev co co)

Kauj Ruam 1: Tsim Tus Neeg rau zaub mov ntawm MKR

Tsim Tus Neeg rau zaub mov ntawm MKR
Tsim Tus Neeg rau zaub mov ntawm MKR
Tsim Tus Neeg rau zaub mov ntawm MKR
Tsim Tus Neeg rau zaub mov ntawm MKR

Teem lub MKR thiab daim ntawv qhia zaub mov zoo li hauv daim duab.

Liab LED tau txuas nrog los ntawm 1K Ohm resistor, rau Pin #5. Ntawm MKR qhov no yog tus lej digital nrog mem tes dav tes taws los piav (PWM) uas tso cai rau peb teeb tsa qhov sib txawv rau qhov ci ntawm LED liab. Lwm sab ntawm LED txuas nrog hauv av.

Lwm qhov LED siv hauv txoj haujlwm no yog onboard ib ntawm MKR. Qhov no tau cim "L" thiab yog lub teeb ntsuab ntsuab nyob ze rau VCC tus pin.

Tam sim no rub tawm (lossis tsuas yog luam) cov cai rau MKR server los ntawm no:

github.com/TonyCanning/MKR1000-IoT - lub npe kos duab Arduino yog "MKRServerLED.ino"

Kho qhov no kom suav nrog koj cov ntaub ntawv pov thawj wifi netwwork thiab xa qhov no rau koj MKR1000.

Thaum rub tawm, qhib koj lub xov tooj ntawm tes. (Saib duab rau cov lus piav qhia ntawm kev tso tawm) Thaum pib qhov no yuav qhia koj me ntsis ntau dua li IP chaw nyob ntawm tus neeg rau zaub mov. Nco tseg ntawm qhov chaw nyob no raws li koj yuav xav tau suav nrog nws hauv tus neeg siv khoom ib yam nkaus.

Txog tam sim no, tus neeg rau zaub mov tau nce - peb yuav teeb tsa lwm MKR1000 ua tus neeg siv khoom rau lub server no. Txawm li cas los xij, vim nws yog tus server koj yuav tuaj yeem txuas rau nws los ntawm ib lub cuab yeej ntawm koj lub network los ntawm kev ntaus tus muab https://192.168.*.* chaw nyob rau hauv txhua lub browser.

Muab qhov no mus thiab nco ntsoov tias nplooj ntawv muab tau muaj qhov chaw nyob nyem tau los hloov qhov xwm txheej ntawm LEDs ntawm koj li MKR10000 server. Tsis tas li nco ntsoov tias cov ntawv xov xwm ntxaws ntxaws nthuav qhia kom lees paub cov GET thov tau txais los ntawm tus neeg rau zaub mov.

Nco tseg: muaj cov tsev qiv ntawv uas koj yuav xav tau los teeb tsa, Kuv zoo nkauj heev koj yuav tau teeb tsa Wifi101 lub tsev qiv ntawv tsawg kawg. Muaj tinkered rau lub sijhawm ntev Kuv tsis paub tseeb tias koj yuav lossis tsis xav tau los ntawm kev teeb tsa tshiab. Thov xa mus rau qhov muaj txiaj ntsig ntawm cov ntaub ntawv muaj txog kev txhim kho cov tsev qiv ntawv lossis lwm yam teeb meem uas koj yuav muaj nrog txuas/rub tawm thiab lwm yam.

Kauj Ruam 2: Tsim Tus Neeg Siv Khoom kom xa cov lus thov mus rau Server

Tsim Tus Neeg Siv Khoom kom xa cov lus thov mus rau Server
Tsim Tus Neeg Siv Khoom kom xa cov lus thov mus rau Server
Tsim Tus Neeg Siv Khoom kom xa cov lus thov mus rau Server
Tsim Tus Neeg Siv Khoom kom xa cov lus thov mus rau Server

Ib zaug ntxiv, teeb tsa daim ntawv qhia zaub mov raws li qhia hauv daim duab.

Hauv qhov no lub pob txuas nrog tus pin 9 thiab lub ntsuas kev co tau txuas nrog tus pin 8. Bot pins yog cov pins digital raws li lub xeev rau ob qho ntawm cov tswv yim no yog binary.

Thaum ua tiav koj tuaj yeem rub tawm (lossis theej thiab muab tshuaj txhuam) tus neeg siv cov cai los ntawm no:

github.com/TonyCanning/MKR1000-IoT - lub npe cov ntaub ntawv yog "MKRClientGET.ino"

Txij ntawm no kuv pom zoo kom tshem lub server MKR los ntawm koj lub PC vim tias koj yuav tsis pom qhov sib txawv hauv npe thaum koj xaiv COM chaw nres nkoj.

Kho qhov chaws los muab koj li ntawv pov thawj network wifi thiab MKR server IP chaw nyob. Nco ntsoov koj saib rau txhua qhov piv txwv ntawm "192" thiab hloov mus rau koj li IP chaw nyob server. Tshaj tawm cov cai rau tus neeg siv khoom MKR thiab qhib qhov saib ua ntej.

Saib cov duab ntawm cov saib saib tawm thiab sim tsoo lub pob thiab ua rau muaj kev vibration sensor.

Kauj Ruam 3: Xeem Nws

Koj yuav tsum ua tiav….

Txog tam sim no koj tuaj yeem muab lub zog rau txhua MKR1000 (koj puas tau xaiv los ua li ntawd). Muab lawv txog 10 vib nas this thiab sim ua kom cov neeg siv khoom nkag mus saib cov txiaj ntsig ntawm tus neeg rau zaub mov MKR.

Kauj ruam 4: Troubleshooting

Ua ntej nkag mus rau hauv kev daws teeb meem - tshawb xyuas cov hauv paus. Puas yog koj muab lub zog rau ob qho MKRs? Koj puas paub tseeb tias tus lej server nyob ntawm server MKR thiab tus lej siv rau tus neeg siv MKR?

Teeb meem thiab cov kev daws teeb meem:

1. C: / Users / tony / Documents / Arduino / MKRClientGET / MKRClientGET.ino: 11: 18: yuam kev tuag: 1234.h: Tsis muaj cov ntaub ntawv lossis cov npe #include

^

muab tso ua ke lawm.

Nov yog qhov teeb meem nrog lub tsev qiv ntawv koj tsis tau teeb tsa. Raws li tau sau tseg hauv cov kauj ruam dhau los muaj cov ntaub ntawv ntau txog qhov no.

2. Neeg rau zaub mov lossis Client tsis txuas rau koj lub wifi; tej zaum koj tsis tau muab koj daim ntawv pov thawj wifi.

3. Cov neeg siv khoom saib xyuas lub xeev hloov pauv tab sis tsis muaj kev cuam tshuam ntawm server; yuav tshwm sim los ntawm tsis muab tus IP chaw nyob server hauv koj tus lej siv.

4. Khawm tsis qhia qhov hloov pauv hauv lub xeev saib; txheeb xyuas koj cov neeg sib tham hauv rooj sib tham.

Pom zoo: