Cov txheej txheem:

RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android): 4 Cov Kauj Ruam (nrog Duab)
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android): 4 Cov Kauj Ruam (nrog Duab)

Video: RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android): 4 Cov Kauj Ruam (nrog Duab)

Video: RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android): 4 Cov Kauj Ruam (nrog Duab)
Video: SLITHER.io (OPHIDIOPHOBIA SCOLECIPHOBIA NIGHTMARE) 2024, Hlis ntuj nqeg
Anonim
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android)
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android)
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android)
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android)
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android)
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android)
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android)
RBG 3D Luam Lub Hli Tswj Nrog Blynk (iPhone lossis Android)

Nov yog lub hli luam tawm 3D nrog sawv ntsug. Ua nrog RGB LED sawb ntawm 20 leds txuas nrog rau arduino uno thiab programmed kom tswj tau nrog blynk. Arduino yog qhov ua tau los tswj ntawm lub app los ntawm blynk ntawm iPhone lossis Android.

Kauj Ruam 1: Qhov Chaw thiab Cov Cuab Yeej:

Qhov thiab Cov Cuab Yeej
Qhov thiab Cov Cuab Yeej
Qhov thiab Cov Cuab Yeej
Qhov thiab Cov Cuab Yeej
Qhov thiab Cov Cuab Yeej
Qhov thiab Cov Cuab Yeej

1x - ws2812b LED sawb, kuv siv 1m 30led sawb thiab txiav tawm 20 leds rau qhov no.

1x - 3D luam lub hli, txuas mus rub los ntawm ntau yam:

1x - 3D luam tawm lub hli sawv ntsug, txuas los ntawm ntau yam:

1x - 3D luam tawm LED daim kab xev tuav, tus kheej tau rub tawm cov ntawv zip ntxiv kom tau txais cov ntawv. Koj yuav tsum ntsuas nws mus rau 1000%!

1x - arduino uno + cable

1x computer nrog network

Kauj Ruam 2: Txheej Txheem Tsev:

Lub Tsev Txheej Txheem
Lub Tsev Txheej Txheem
Lub Tsev Txheej Txheem
Lub Tsev Txheej Txheem
Lub Tsev Txheej Txheem
Lub Tsev Txheej Txheem

Kuv pib los ntawm muab daim kab xev tso rau ntawm daim kab xev coj thiab txuas nws mus rau tus tuav daim kab xev coj. Nco ntsoov tsis txhob npog ib qho ntawm lub teeb thiab tseem siv daim kab xev uas tsis ua hluav taws xob thaum koj muab nws tso rau hauv lub yob.

Txhawm rau kom sawv ntsug rau lub hli muaj zog dua, Kuv tau siv qee daim kab xev ob sab thiab tso qee qhov siab li ob peb feeb thiab lawv tuav tau zoo heev.

Cov hlua coj nrog cov coj tuav tuav tau muab tso rau saum lub rooj muag zaub, Kuv thawb cov hlua los ntawm cov hlua coj los ntawm kev sawv ntsug thiab txuas nws mus rau arduino. Kuv kuj siv qee daim kab xev ob tog los tuav nws hauv qhov chaw.

Yuav ua li cas cov cables txuas nrog:

- Dub cable rau hauv av (gnd)

- Liab cable rau 5v los ntawm arduino

- Ntsuab kab txuas rau tus pin 8, tus lej los ntawm tus lej zip tseem yuav siv tus pin 8 + 20 leds.

Kuv tsis tau siv cov khoom siv hluav taws xob sab nraud yog li kuv txo qis qhov ci ci siv rau lub leds.

Arduino uno yog qhov loj me me rau qhov sawv ntsug no yog li kuv yuav tsum rub tawm cov txheej hauv qab ntawm qhov sawv ntsug thiab teeb tsa tag nrho sawv ntsug hla lub thawv me me nrog qee chav hauv qab lub hli.

Kuv tsuas yog muab lub hli hla lub yob, yog li nws muaj peev xwm tsuas yog nqa yog tias qhov ntawd puas tsim nyog.

Kauj Ruam 3: Kev Txhim Kho Arduino + Blynk App:

Kev Kawm Ua Haujlwm Arduino + Blynk App
Kev Kawm Ua Haujlwm Arduino + Blynk App
Kev Kawm Ua Haujlwm Arduino + Blynk App
Kev Kawm Ua Haujlwm Arduino + Blynk App
Kev Kawm Ua Haujlwm Arduino + Blynk App
Kev Kawm Ua Haujlwm Arduino + Blynk App

Qhov kev zov me nyuam feem ntau yog siv los ntawm blynk piv txwv nplooj ntawv:

Kuv siv zebra RGB tswj thiab tus swb kom teeb ci.

Thaum koj tau teeb tsa koj tus lej lees paub thiab xa cov cai nkag mus rau arduino, tom qab ntawd koj tuaj yeem pib cmd yog tias koj nyob ntawm windows lossis Terminal ntawm mac lossis linux txuas rau phau ntawv qhia ntawm no: https://www.youtube.com/embed/ fgzvoan_3_w

Txoj Cai:

#include #include // Koj yuav tsum tau txais Auth Token hauv Blynk App. // Mus rau Qhov Chaw Haujlwm (icon txiv ntoo). char auth = "KOJ CODE NTAWM NO"; // teeb tsa koj cov cai los ntawm blynk app ntawm no Adafruit_NeoPixel strip = Adafruit_NeoPixel (20, 8, NEO_GRB + NEO_KHZ800); // tus 20 yog rau tus lej ntawm cov coj, 8 hauv tus pin siv ntawm arduino board // Tawm tus nqi 0 txog 255 kom tau txais tus nqi xim. // Cov xim yog qhov hloov pauv r - g - b - rov qab rau r. uint32_t Log (byte WheelPos) {yog (WheelPos <85) {rov qab strip. Color (WheelPos * 3, 255 - WheelPos * 3, 0); } lwm yog (WheelPos <170) {WheelPos -= 85; rov qab strip. Color (255 - WheelPos * 3, 0, WheelPos * 3); } lwm {WheelPos -= 170; rov qab strip. Color (0, WheelPos * 3, 255 - WheelPos * 3); }} BLYNK_WRITE (V2) {int ci ntsa iab = param.asInt (); strip.setBrightness (ci ntsa iab); } BLYNK_WRITE (V1) {int hloov = param.asInt (); rau (int i = 0; kuv <strip.numPixels (); i ++) {strip.setPixelColor (i, Log (hloov & 255))); // LOS YOG: strip.setPixelColor (i, Log (((i * 256 / strip.numPixels ()) + ua haujlwm) & 255)); } strip.show (); } tsis muaj teeb tsa teeb tsa () {// Debug console // Blynk yuav ua haujlwm los ntawm Serial // Tsis txhob nyeem lossis sau cov lej no tus kheej hauv koj daim duab duab Serial.begin (9600); Blynk.begin (Serial, auth); strip.begin (); strip.show (); } tsis muaj dab tsi voj () {Blynk.run (); }

Kauj Ruam 4: Cov Duab Kawg:

Cov Duab Kawg
Cov Duab Kawg
Cov Duab Kawg
Cov Duab Kawg
Cov Duab Kawg
Cov Duab Kawg
Cov Duab Kawg
Cov Duab Kawg

Tam sim no koj tuaj yeem tswj xim thiab ci ci ntawm lub hli nrog koj lub xov tooj. Tsis tas li koj pom ntau lub hli ntxaws nrog lub teeb daj/dawb ntawm qhov ci qis. Tab sis cov xim zoo tiag tiag ntawm 3D luam lub hli.

Vam tias qhov no tau pab qee leej:)

Pom zoo: