Cov txheej txheem:

Ib qho yooj yim LED Cube 2X2X2: 4 Cov Kauj Ruam (nrog Duab)
Ib qho yooj yim LED Cube 2X2X2: 4 Cov Kauj Ruam (nrog Duab)

Video: Ib qho yooj yim LED Cube 2X2X2: 4 Cov Kauj Ruam (nrog Duab)

Video: Ib qho yooj yim LED Cube 2X2X2: 4 Cov Kauj Ruam (nrog Duab)
Video: 3D Art, Drawing of a realistic scissors, Hyperrealistic drawing a pair of scissors, webart #32 2024, Hlis ntuj nqeg
Anonim
Image
Image

Lub voos xwmfab LED no tau tsim los siv 8 lub LED ntsuab thiab Arduino Uno microcontroller thaum nws tsuas xav tau ob tus tiv thaiv rau kev tswj hwm ob lub dav hlau ua tiav ntawm 4 LEDs ib leeg. Tom qab mus ntsib, koj tuaj yeem xa cov cai ntawm:

Kauj Ruam 1: Nqi Khoom

Nqi Khoom
Nqi Khoom
Nqi Khoom
Nqi Khoom

Koj yuav xav tau dab tsi:

1 Arduino UAS

15cmX7cm PCB

1 40-tus pin header rau arduino ntaub thaiv npog

8 5 hli LEDs

1 USB-A rau USB-B cable

2100 Ohm tus tiv thaiv

Kauj Ruam 2: Sib dhos LED Lub Voos Xwmfab

Sib dhos LED Cube
Sib dhos LED Cube
Sib dhos LED Cube
Sib dhos LED Cube
Sib dhos LED Cube
Sib dhos LED Cube

Qhov no yog kev tsim kho yooj yim vim tias nws tsuas muaj 8 LEDs. Ntawd yog, koj yuav txuas 4 cathodes ib leeg hauv txhua lub dav hlau ntawm 4 LEDs. Thaum koj tau ua tiav nrog kev ua haujlwm dhau los, koj yuav tsum tsim lub dav hlau othar ntawm 4 LEDs. Tom qab ntawd, koj yuav cuam tshuam nrog anodes dawb hauv txhua lub dav hlau feem. Txhawm rau upload cov cai, koj tuaj yeem mus ntsib:

Tom qab ntawd, xa cov cai ntawm:

Kauj Ruam 3: Txhim Kho Cov Tiv Thaiv

Txhim kho cov Resistors
Txhim kho cov Resistors
Txhim kho cov Resistors
Txhim kho cov Resistors
Txhim kho cov Resistors
Txhim kho cov Resistors

Thaum koj ua tiav txhua qhov kev sib txuas ntawm koj 8 LEDs, koj yuav tsum teeb tsa lub resistors ntawm 100 Ohm thiab tus pin ntawm kev txuas mus rau arduino. Ntawd yog, koj yuav muaj qhov kev tshuaj xyuas ib kauj ruam yog tias txhua yam ua tau zoo yog li koj tau ua tiav thiab koj txoj haujlwm tuaj yeem ua tiav. Nco tseg cov ntsiab lus loj dua yog 4 anodes yuav txuas nrog Arduino pins 2, 3, 4, thiab 5 sib xws thaum 100 Ohm resistors yuav txuas nrog A0 thiab A1 feem.

Kauj Ruam 4: Ua tiav Txoj Haujlwm

Ua tiav Txoj Haujlwm
Ua tiav Txoj Haujlwm
Ua tiav Txoj Haujlwm
Ua tiav Txoj Haujlwm
Ua tiav Txoj Haujlwm
Ua tiav Txoj Haujlwm

Thaum ua tiav txoj haujlwm, teeb tsa daim thaiv los ntawm nws ntawm koj Arduino Uno txhawm rau txuas ntxiv xa koj li Arduino code ntawm:

Pom zoo: