Cov txheej txheem:

Super Easy Crystal Mood Light: 6 Kauj Ruam
Super Easy Crystal Mood Light: 6 Kauj Ruam

Video: Super Easy Crystal Mood Light: 6 Kauj Ruam

Video: Super Easy Crystal Mood Light: 6 Kauj Ruam
Video: Я работаю в Страшном музее для Богатых и Знаменитых. Страшные истории. Ужасы. 2024, Hlis ntuj nqeg
Anonim
Super Easy Crystal Mood Lub Teeb
Super Easy Crystal Mood Lub Teeb

Nyob Zoo Makers! Qhov no yog super duper yooj yim arduino project uas yuav ua haujlwm raws li cov cuab yeej kawm nrog rau lub siab phem txaus ntshai lub teeb. Nws tsuas yog ob peb daim, yog li koj tuaj yeem nplawm nws ua ke nyob rau lub sijhawm nws yuav siv los luam tawm lub hauv paus. Ua ib zaj lus qhia zoo txog RGB ib yam nkaus!

Qee qhov keeb kwm yav dhau los rau txoj haujlwm no: Kuv tus tij laug (paub tam sim no los ua Unicorn) thiab kuv tau txais qhov txaus Kiwico cov ntawv sau npe (tsis txhawb nqa, tsuas yog nyiam) thiab hauv lub hlis no Tinker crate Unicorn tau txais lub teeb RGB txias txias. Nws tau tsim nws tab sis xav paub sai sai txhua qhov xim tsuas yog muaj rau/tawm yog li nws muaj xim tsawg. Hauv ib ntawm kuv chav kawm rau tsev kawm ntawv, peb yuav tsum ua qhov haujlwm STEM txhua hnub Wednesday. Hnub Wednesday kawg, Unicorn thiab kuv tau rov kho qhov haujlwm no ua ke kom nws tuaj yeem ua kom muaj xim muaj peev xwm ntau dua.

Yog tias koj siv nws los ua kev qhia, Kuv pom zoo kom luam cov hauv paus rau cov tub ntxhais kawm ua ntej. Nws siv sijhawm li 4 teev los luam kuv cov ntawv.

Thov pov npav rau qhov no hauv kev sib tw remix! Nov yog kuv thawj Phau Ntawv Qhia thiab Unicorn thiab kuv ua haujlwm tiag tiag ntawm qhov no. (Tam sim no kuv tuaj yeem txaus siab ntau npaum li cas kev ntaus ntawv cuam tshuam nrog kev sau cov lus qhia!)

Khoom siv

  • RGB LED (me me ua haujlwm)
  • Arduino Uno (thiab roj teeb cable, thiab usb cable rau program, yuav tsum tuaj hauv cov khoom siv yooj yim)
  • Basic jumper xov hlau
  • daim ntawv me me
  • 220 ohm resistor
  • Kiwico cov khoom siv lead ua (lossis lwm yam LED diffuser)

www.kiwico.com/us/store/dp/color-mixing-le…

Nkag mus rau 3D tshuab luam ntawv (lossis ya paub, ua qauv av nplaum zoo li qauv ua khawv koob lossis qee yam)/lub tshuab nqus tsev qub tej zaum? ntoo yog tias koj muaj cov cuab yeej yuav txias

Kauj Ruam 1: Txuas Nws

Hlau Nws!
Hlau Nws!

Txuas cov cathode ntawm RGB coj uas yog tus pin ntev dua ntawm RGB coj mus rau GND ntawm Arduino thiab lwm yam peb tus pin rau tus pin 11, 10, 9 ntawm Arduino los ntawm 220 ohm resistors.

Kauj Ruam 2: Luam Base thiab Ntxig Diffuser (REMIX TIME!)

Luam Base thiab Ntxig Diffuser (REMIX TIME!)
Luam Base thiab Ntxig Diffuser (REMIX TIME!)

3D luam tawm (lossis qauv) puag

Crystal yog remix #1 vim tias nws yog remix ntawm lub teeb kiwico (uas tsuas yog ua ob peb xim)

Lub hauv paus yog remix #2 nws yog remix ntawm cov ntoo qis poly ntawm cov khoom sib txawv: https://www.thingiverse.com/thing: 747609

Kuv tig nws thiab txiav qee qhov rau diffuser thiab lub zog hauv tinkercad. Cov ntaub ntawv kuv luam tawm yog muab tso rau ntawm no.

Kauj Ruam 3: Sijhawm Sijhawm (thiab Remix #3)

Lub Sijhawm Code (thiab Remix #3)
Lub Sijhawm Code (thiab Remix #3)

Cov cai yog los ntawm

Ib qho yooj yim, qhib daim ntawv thov Arduino thiab ua raws cov theem hauv qab no.

1: sau tus txheej txheem teeb.

int red_light_pin = 11; int ntsuab_light_pin = 10; int blue_light_pin = 9; void teeb () {pinMode (red_light_pin, OUTPUT); pinMode (ntsuab_light_pin, OUTPUT); pinMode (blue_light_pin, OUTPUT);}

2: Txoj cai tseem ceeb.

void voj () {

// Koj cov xim mus ntawm no

} tsis muaj dab tsi RGB_color (int red_light_value, int ntsuab_light_value, int blue_light_value) {analogWrite (red_light_pin, red_light_value); analogWrite (ntsuab_light_pin, ntsuab_light_value); analogWrite (blue_light_pin, blue_light_value);}

3: Cov xim ua haujlwm li cas. (bold = kuv cov lus pom, tsis txhob ntxiv rau arduino)

Txhua xim uas koj xav kom nws nyem/mem tes muaj cov ntu no ntxiv hauv qab lub voj void () {

RGB_color (255, 0, 0 rgb tus nqi rau cov xim koj xav tau); // Liab Tawm Cov xim kom nws nyeem tau

ncua (1000); Ntev npaum li cas cov xim nyob ntawd, Kuv paub zoo tias qhov no yog 1 thib ob

4: Piv txwv code:

int red_light_pin = 11; int ntsuab_light_pin = 10; int blue_light_pin = 9; void teeb () {pinMode (red_light_pin, OUTPUT); pinMode (ntsuab_light_pin, OUTPUT); pinMode (blue_light_pin, OUTPUT);} lub voj void () {RGB_color (255, 0, 0); // Liab ncua (1000); RGB_color (0, 255, 0); // Ntsuab ncua (1000); RGB_color (0, 0, 255); // Xiav ncua (1000); RGB_color (255, 255, 125); // Raspberry ncua (1000); RGB_color (0, 255, 255); // Cyan ncua (1000); RGB_color (255, 0, 255); // Magenta ncua (1000); RGB_color (255, 255, 0); // Kev ncua daj (1000); RGB_color (255, 255, 255); // Dawb ncua (1000);} tsis muaj dab tsi RGB_color (int red_light_value, int ntsuab_light_value, int blue_light_value) {analogWrite (red_light_pin, red_light_value); analogWrite (ntsuab_light_pin, ntsuab_light_value); analogWrite (blue_light_pin, blue_light_value);}

Kauj Ruam 4: Xa mus rau Arduino

Xa mus rau Arduino
Xa mus rau Arduino

USB-ntsaws koj lub rooj tsavxwm rau hauv koj lub computer. Nias lub cim kos kom paub tseeb thiab nias lub xub kom xa mus rau arduino. Thaum LED pib ntsais muag los ntawm koj cov cai, koj tuaj yeem tshem nws los ntawm koj lub khoos phis tawj. Txuas lub roj teeb 9V rau hauv lub rooj tsavxwm thiab cov cai yuav ua haujlwm.

Kauj Ruam 5: Muab Nws Ua Ke

Muab tso ua ke
Muab tso ua ke

Muab lub rooj tsavxwm tso rau hauv lub hauv paus nrog lub hwj huam qaum tawm los ntawm lub qhov.

Kauj Ruam 6: Koj puas xav rov sau dua nws dua?

Coj nws tawm, ntsaws rau hauv lub khoos phis tawj, cim nws, thiab tso rov qab rau hauv lub hauv paus dua. Txaus siab rau!

Ib daim vis dis aus ntawm nws tau txuas nrog.

Pom zoo: