Cov txheej txheem:

LED Ukulele: 6 Kauj Ruam (nrog Duab)
LED Ukulele: 6 Kauj Ruam (nrog Duab)

Video: LED Ukulele: 6 Kauj Ruam (nrog Duab)

Video: LED Ukulele: 6 Kauj Ruam (nrog Duab)
Video: Touring Michael Jordan's Mansion! 2024, Hlis ntuj nqeg
Anonim
Image
Image
Kho vajtse
Kho vajtse

Nyob zoo, kuv lub npe yog Elaine. Txoj haujlwm no suav nrog ntau yam uas kuv nyiam yog li kuv vam tias koj yuav txaus siab rau nws ib yam! LED ukulele peb yuav tsim tsev qhia koj yuav ua li cas ua plaub lub suab ua si tshaj plaws: C, G, Am, thiab F. Tsis muaj suab paj nruag yav dhau los kev paub yuav tsum tau pib strumming nrog cov nkauj nrov. Nws yog txoj haujlwm zoo rau Arduino thiab pib ukulele.;) Yog tias koj tab tom nrhiav qee yam nyuaj me ntsis, sim ua Duab ntxoov ntxoo los txhim kho qhov kawg ntawm Cov Lus Qhia no.

Kauj ruam 1: Kho vajtse

"chaw thau khoom =" tub nkeeg"

Yeem: Duab ntxoov ntxoo los hloov kho dua tshiab
Yeem: Duab ntxoov ntxoo los hloov kho dua tshiab
Yeem: Duab ntxoov ntxoo los hloov kho dua tshiab
Yeem: Duab ntxoov ntxoo los hloov kho dua tshiab

Koj puas paub LEDs tsis tsuas yog tso tawm lub teeb tab sis tseem tuaj yeem hnov lub teeb? Kev tshoov siab qhov xwm txheej me me no, Kuv xav hloov kho lub LED ukulele kom nws yuav tsis tsuas yog qhia koj qhov twg tso koj cov ntiv tes tab sis tseem taug qab seb puas tau tso koj tus ntiv tes rau ntawm qhov chaw raug.

HARDWARE

Yog tias koj txaus siab rau qhov kev tsim no, koj yuav xav tau ob peb yam ntxiv:

1. Ntau LEDs: Koj yuav xav tau tsawg kawg 6 LEDs ntxiv los ua lub teeb pom kev zoo. Txhua LED ntawm tus ntiv tes yuav tau txais tus khub LED sensor.

2. I/O chaw nres nkoj nthuav dav: Nyob ntawm seb Arduino pawg thawj coj saib koj siv li cas, koj yuav xav tau qhov chaw nres nkoj nthuav dav. Kuv tab tom siv Arduino Uno board thiab Sparkfun SX1509 Port Expander.

CODE

Kuv tau qhia ob peb yam ntxiv rau cov cai txhawm rau ua kom nws ua haujlwm. Kuv yuav ua txhaum cov hauv paus ntawm no, tab sis xav tias dawb los rub tawm master_tweak.ino cov ntaub ntawv rau kev tawg tag nrho:

1. Arrays: Ib qho tshwj xeeb array tau tsim los khaws cov ntaub ntawv nkag los ntawm txhua lub sensor LED. Kev ua haujlwm me me tau hu los nyeem cov ntaub ntawv nkag txhua 10 milliseconds thiab cov array tau hloov kho tshiab yuav luag tas li.

2. Lub Xeev Game: Thaum thawj qhov kev tsim muaj ntau theem sib txawv ntawm qhov kev ua si, ntawm no peb qhia meej meej cov cai hauv cov xeev sib txawv game txhua tus nrog kev yeej rau kev ua si kom txav mus.

3. LED pom lub teeb pom kev: Ib ntu tag nrho ntawm cov cai tau mob siab rau nyeem cov ntaub ntawv nkag los ntawm LED lub teeb pom kev zoo. Kuv pom qhov kev qhia tshwj xeeb no muaj txiaj ntsig zoo nrog kev nkag siab txog cov neeg kho tshuab thiab sib txuas hauv Circuit.

HOOKUP GUIDE

Kuv pom zoo kom mus dhau ntawm Duab ntxoov ntxoo los qhia kom tau txais kev xav ntawm yuav ua li cas txhawm rau teeb tsa lub teeb pom kev pom ntawm LED. Hloov chaw ntawm txuas 3 LEDs zoo li qhov qhia, qhov kev tsim no yuav ua rau koj nqes 6 (Saib daim duab#1). Qhov sib txuas zaum kawg, yog tias koj tseem siv lub chaw nres nkoj nthuav dav yuav tsum zoo li daim duab #2.

ASSEMBLYAssembling qhov kev hloov kho no yog qhov yooj yim zoo nkauj. Laum ib lub qhov ntxiv tom ntej ntawm txhua LED hauv tus ntiv tes thiab ntxig lub teeb pom kev zoo LED. Rhuav txhua yam thiab koj yuav tsum npaj mus!

Qhov kev hloov kho tshiab no yuav siv sijhawm ntev me ntsis los txiav txim siab, tshwj xeeb tshaj yog txuas rau hauv Circuit Court thiab siv tag nrho cov khoom siv ntxiv hauv qhov chaw, tab sis LED ukulele kuj tseem yuav hloov pauv mus ua kev sib tham. Qhia rau kuv paub tias nws mus rau koj li cas! Hmoov zoo!

Pom zoo: