Cov txheej txheem:

DIY Rainbow House Decor: 5 Kauj Ruam
DIY Rainbow House Decor: 5 Kauj Ruam

Video: DIY Rainbow House Decor: 5 Kauj Ruam

Video: DIY Rainbow House Decor: 5 Kauj Ruam
Video: Amazing Kid’s Room Makeover || Guide For Parents 2024, Hlis ntuj nqeg
Anonim
Image
Image
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi

Zoo siab txais tos rau kuv kab lus tshiab… Ua DIY Rainbow House Decoration!

Arduino tuaj yeem siv los ua kom zoo rau txhua qhov haujlwm hluav taws xob. Nov kuv tau siv nws los ua kom zoo nkauj zoo nkauj rau koj lub tsev.

Qhov "zaj sawv" ib feem ntawm txoj haujlwm no yog RGB LED, uas thaum qhib thaum hmo ntuj tsim lub teeb pom kev zoo nkauj.

Txoj haujlwm no yog npaj los ua kom hloov pauv, yog li xav tias muaj kev hloov pauv rau koj li kev hloov pauv ntawm txoj haujlwm no (tab sis ua raws txoj cai kev cai thov!)

Mus ntsib kuv hauv YouTube ntawm no txhawm rau nrhiav cov vis dis aus hais txog Arduino, Raspberry Pi, thiab ntau ntxiv.

Txaus tham; cia peb pib!

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Hauv qab no yog ntu koj yuav xav tau rau DIY Rainbow House Decor:

  • Arduino Ib
  • DC Tsav Me Me
  • Lub cev yas rau txoj haujlwm
  • 3 Cov nab kuab
  • Kub nplaum phom nrog kua nplaum
  • Daim kab xev
  • AAA Roj teeb tuav
  • AAA roj teeb
  • 2.1 hli chim ntsaws ntsaws AC rau DC adapter
  • 5V Relay Module
  • Hom Anode RGB LED module*
  • Lub khoos phis tawj nrog Arduino IDE thiab lwm lub tsev qiv ntawv teeb tsa (raws li kuv yuav hais tom qab)
  • thiab ntau lub xov hlau jumper thiab duab los qhia!

*a "nquag anode" RGB LED txhais tau tias muaj 3 tus pin hauv av rau cov xim sib txuas thiab tsuas yog ib qho txuas rau lub zog zoo ntawm tus qauv.

Tswv yim: siv tus qauv xa xov, tsuas yog siv qhov txuas ib txwm yog tias koj paub meej qhov twg txhua tus pin coj mus rau

Thaum koj muaj cov khoom siv no npaj nrog koj, koj tam sim no tuaj yeem pib ua qhov haujlwm!

Kauj ruam 2: Kho vajtse

Txog kuv lub tsev kho kom zoo nkauj kho vajtse, Kuv siv cov yas qub uas kuv pom nyob ib puag ncig hauv kuv lub tsev. Koj tuaj yeem hloov qhov no nrog lub cev 3D luam tawm lossis lwm yam muaj peev xwm tuav tau cov ntsiab lus ntawm txoj haujlwm.

Tau kawg, lub casing zoo nkauj tsis tas yuav tsum tau ua, tab sis raws li lub hom phiaj ntawm txoj haujlwm no yog txhawm rau kho kom zoo nkauj lub tsev, Kuv pom zoo kom ua lossis tsawg kawg rov siv qee qhov xwm txheej lossis lub thawv.

Kuv siv rab phom kub kub los txuas cov khoom ntawm txoj haujlwm mus rau lub casing. Ib zaug ntxiv, koj tuaj yeem hloov rab yaj phom kub rau lwm yam nplaum uas koj xav siv.

Nyeem rau ntawm daim duab qhia chaw thiab kev sib txuas …

Kauj ruam 3: Circuit Court

Qhov Circuit
Qhov Circuit

Nov yog cov kev sib txuas kuv siv rau DIY Rainbow House Decor:

RGB LED teeb:

  • Qhov anode uas nquag siv ntawm RGB LED mus rau 5V
  • Tus pin liab ntawm LED mus rau tus pin D11
  • Tus pin xiav ntawm LED mus rau tus pin D10
  • Tus pin ntsuab ntawm LED mus rau tus pin D9

Qhov Relay:

  • V +, +, 3V, lossis 5V (txuas lub zog zoo) mus rau tus pin VIN
  • The Trig, S, lossis Sig (muab lub teeb liab xa mus thaum HIGH) nkag mus rau tus pin 5V
  • Gnd, G, -, lossis V- (qhov tsis zoo txuas txuas) mus rau tus pin GND
  • Ib qho ntawm cov pins sau NO yog ntawm tus qauv txuas mus rau ib qho ntawm lub cav tus pin, thaum lwm tus pin sau NO TSIS mus rau hauv ib qho ntawm tus pin ntawm AAA tus tuav lub roj teeb.

Lub Cev Muaj Zog:

  • Ib qho ntawm lub cav tus pin mus rau hauv ib qho ntawm cov relay tus pins sau NO
  • Lwm qhov nkag mus rau ib qho ntawm AAA cov neeg tuav cov roj teeb sib txuas

Lub roj teeb AAA:

  • Ib qho ntawm tus tuav lub roj teeb tus pin mus rau ib qho ntawm lub cav tus pin
  • thaum lwm tus nkag mus rau ib qho ntawm cov pins sau tsis muaj ntawm qhov txuas

Kauj ruam 4: Txoj Cai

Txoj Cai
Txoj Cai

Hauv qab no yog tus lej rau Arduino IDE. Luam nws rau hauv tus editor thiab xa cov cai.

int redPin = 11; // tus pin rau LED tus pin liab

int bluePin = 10; // tus pin rau LED tus xiav tus pin int greenPin = 9; // tus pin rau LED tus ntsuab tus pin tus nqi int; teeb tsa tsis muaj dab tsi () {pinMode (redPin, OUTPUT); tus pinMode (bluePin, OUTPUT); tus pinMode (greenPin, OUTPUT); } void loop () {rau (tus nqi = 255; tus nqi> 0; tus nqi-) {analogWrite (11, tus nqi); analogWrite (10, 255-tus nqi); analogWrite (9, 128-tus nqi); ncua (10); } rau (tus nqi = 0; tus nqi <255; tus nqi ++) {analogWrite (11, tus nqi); analogWrite (10, 255-tus nqi); analogWrite (9, 128-tus nqi); ncua (10); }}

Tam sim no koj tau xa cov cai rau koj Arduino, koj ua tiav!

Kauj ruam 5: Nws yog

Koj tau ua tiav koj li DIY Rainbow House Decor!

Los yog tsawg kawg ua tiav nyeem kab ntawv no:)

Hauv txhua qhov xwm txheej, ua tau zoo! Muab koj tus kheej rau sab nraub qaum.

Ua tsaug rau kev nyeem kab lus no!

Pom zoo: