Cov txheej txheem:

Smartphone Tswj Neopixels (LED Sawb) Nrog Blynk App Hla WiFi: 6 Cov Kauj Ruam
Smartphone Tswj Neopixels (LED Sawb) Nrog Blynk App Hla WiFi: 6 Cov Kauj Ruam

Video: Smartphone Tswj Neopixels (LED Sawb) Nrog Blynk App Hla WiFi: 6 Cov Kauj Ruam

Video: Smartphone Tswj Neopixels (LED Sawb) Nrog Blynk App Hla WiFi: 6 Cov Kauj Ruam
Video: This diy DMX Light Rig will Change Your Live Shows 2024, Kaum ib hlis
Anonim
Smartphone Tswj Neopixels (LED Sawb) Nrog Blynk App Tshaj WiFi
Smartphone Tswj Neopixels (LED Sawb) Nrog Blynk App Tshaj WiFi

Kuv tsim txoj haujlwm no tom qab kuv tau kev tshoov siab los ntawm lub xov tooj smartphone tswj neopixels hauv tsev phooj ywg tab sis nws tau khw-yuav. Kuv xav "nyuaj npaum li cas los ua kuv tus kheej, nws yuav raug nqi ntau dua!"

Nov yog li cas.

Nco tseg:

Kuv xav tias koj tau paub nrog ib puag ncig lub tswv yim arduino, yog tias tsis yog li ntawd muaj ntau yam kev qhia tawm.

Hloov tshiab:

2019-04-04 - Ntxiv zeRGBa siv hauv app.

Kauj Ruam 1: Sau Qhov Chaw

Sib Sau
Sib Sau
Sib Sau
Sib Sau
Sib Sau
Sib Sau

1. NodeMCU (lossis lwm hom esp8266, tab sis MCU yuav ua haujlwm zoo tshaj)

2. Jumper xov hlau (3x txiv neej-> poj niam, 2x poj niam-> poj niam)

3. Neopixels

4. Smartphone

Kauj ruam 2: Kev thaiv kab

Thaiv
Thaiv

Txuas GND ntawm Neopixels rau MCU GND.

Neopixel DATA MCU tus pin D3.

Neopixel +5V sab nraud 5V fais fab mov (koj yuav tsum txuas neopixels mus rau cov khoom siv sab nraud lossis lawv yuav kos rau ntau qhov tam sim no los ntawm tus tswj hwm thiab kib nws, ntxiv rau MCU tsis muaj tus pin 5v!)

MCU GND fais fab mov GND.

Fais fab mov+ MCU Vin tus pin.

Kauj ruam 3: Rub cov tsev qiv ntawv

Rub tawm Tsev Qiv Ntawv
Rub tawm Tsev Qiv Ntawv
Rub tawm Tsev Qiv Ntawv
Rub tawm Tsev Qiv Ntawv

Ua ntej peb yuav xav tau lub tsev qiv ntawv adafruit neopixel los tswj cov LEDs. Nws tuaj yeem pom nyob hauv tus thawj tswj tsev qiv ntawv, tsuas yog tshawb rau 'adafruit neopixel' thiab xaiv qhov uas qhia thiab teeb tsa nws.

Tom qab ntawd txhawm rau rub tawm cov lus txhais ntawm pawg thawj coj, qhib ua ntej thiab muab tshuaj txhuam https://arduino.esp8266.com/stable/package_esp8266com_index.json rau hauv lub thawv 'ntxiv board URLs'. Tom qab ntawd qhib tus thawj tswj hwm pawg thiab tshawb rau 'esp8266' nws yuav tsum yog thawj tus, nyem rau nws thiab teeb tsa nws.

Kauj ruam 4: Code

Tsim cov duab kos tshiab thiab npe nws 'neopixels ntawm esp8266 nrog blynk' (lossis qee yam uas koj yuav nco ntsoov). Muab tshuaj txhuam rau hauv txoj cai.

Hloov 'yourAuthCode' rau tus lej lees paub rau koj txoj haujlwm. (pom hauv lub cim 'txiv ntoo' hauv blynk app)

Hloov koj lub npe wifi thiab tus password rau cov ntawm koj lub network.

Teem tus naj npawb ntawm neopixels rau qhov ntev ntawm koj daim kab xev.

Txuas koj MCU rau hauv koj lub computer, xaiv MCU los ntawm cov ntawv qhia zaub mov hauv lub tswv yim, xaiv COM chaw nres nkoj thiab tus nqi baud (115200) tab sis tsis quav ntsej txhua qhov ntxiv, nws yuav tsum tau teeb tsa ua ntej. Tom qab ntawv rub tawm!

Kauj ruam 5: Blynk App

App ntawm Blynk
App ntawm Blynk
App ntawm Blynk
App ntawm Blynk

Nruab blynk app los ntawm app khw lossis ua si tom khw.

Thaum nws tau teeb tsa, qhib nws thiab tsim ib tus as khauj.

Tsim txoj haujlwm tshiab tom qab ntawd rub hauv 2 lub ntsej muag khawm, 1 ntawv qhia zaub mov, 1 kab rov tav kab rov tav thiab 3 kab ntsug ntsug los ntawm lub thawv widget.

Coj mus rhaub ntawm cov ntawv qhia zaub mov, tom qab ntawd hloov lub npe rau "Xim", coj mus rhaub ntawm lub thawv uas hais tias 'PIN' hloov qhov no mus rau tus pin virtual V0.

Tsim 9 cov ntawv qhia zaub mov:

liab, ntsuab, xiav, daj, ntshav, turquoise, dawb, tawm thiab kev cai. (Hauv qhov kev txiav txim !!).

Rov qab mus ces coj mus rhaub ntawm ib qho ntawm cov nyees khawm, teeb nws tus PIN rau tus pin virtual V2, thiab 'tawm' daim ntawv lo thiab 'ntawm' daim ntawv lo ob qho tib si rau "zaj sawv".

Rov qab mus thiab nyem rau ntawm lwm lub pob, teeb nws tus PIN rau tus pin virtual V3, thiab 'rau' thiab 'tawm' cov ntawv lo ob qho tib si rau "hloov tshiab".

Rov qab rov qab nyem rau kab rov tav kab rov tav, npe nws "ci ntsa iab", thiab teeb nws tus lej PIN rau tus lej virtual V1, tig rau 'qhia tus nqi' yog tias koj xav tau thiab tua OFF 'xa tawm', qhov 'sau luv' yuav tsum yog 100ms.

Rov qab rov qab nyem rau ntawm ib qho ntawm cov kab ntsug ntsug, npe nws "Liab", tom qab ntawd teeb nws tus PIN rau tus pin virtual V4, 'qhia tus nqi' thiab 'xa tawm' ob qho tib si rau ON.

Ua tib yam rau 2 kab ntawv tom ntej, tab sis sau lawv "Xiav" thiab "Ntsuab", nrog pins virtual V5 thiab V6 feem.

Yog tias koj tsis xav siv cov sliders, koj tuaj yeem siv cov pob zeb zeRGBa xwb. Coj mus rhaub ntawm lub cim, tom qab ntawd xaiv tus pin; V4, V5, V6 rau Liab, Ntsuab, Xiav feem. Nco ntsoov tias qhov txiaj ntsig yog los ntawm 0 txog 255.

Tuav thiab rub tus widget kom txav lawv mus.

Nyem lub cim ua si nyob rau sab saum toj sab xis los siv koj li app.

Siv koj li APP:

Nco ntsoov tias koj txuas nrog tib lub network WiFi zoo li MCU.

Xaiv cov xim los ntawm cov ntawv qhia zaub mov nco tseg yuav teeb lub kab ntawd xim, siv qhov 'ci ntsa iab' slider los hloov qhov ci ci tom qab ntawd nyem hloov tshiab. Nias lub pob 'zaj sawv' yuav ua tus qauv zaj sawv. Yog tias koj xaiv 'kev cai' tom qab ntawd rub lub 'Liab', 'Ntsuab', thiab 'Xiav' sliders los hloov tus nqi, nias hloov tshiab kom hloov xim.

Kauj ruam 6: Ua tiav

Tiav lawm!
Tiav lawm!
Tiav lawm!
Tiav lawm!

Koj qhov project yuav tsum npaj kom siv!

Muaj kev lom zem!

Pom zoo: