Cov txheej txheem:

DIY LED Array (Siv Arduino): 7 Cov Kauj Ruam
DIY LED Array (Siv Arduino): 7 Cov Kauj Ruam

Video: DIY LED Array (Siv Arduino): 7 Cov Kauj Ruam

Video: DIY LED Array (Siv Arduino): 7 Cov Kauj Ruam
Video: How to make a LED digital counter using 7- Segment Display 2024, Hlis ntuj nqeg
Anonim
DIY LED Array (Siv Arduino)
DIY LED Array (Siv Arduino)

INTRO: Koj puas tau xav ua txoj haujlwm yooj yim uas ua rau LEDs zoo li txav mus? Tsis yog? Qhov ntawd yog qhov kuv xav. Zoo, yog tias koj puas tau xav ua qee yam zoo sib xws, koj nyob hauv qhov chaw raug!

Khoom siv:

XEEM NTAWV:

3x 220 ohm resistor (Ntau 220s koj muaj, kev nyab xeeb nws tuaj yeem ua tau!)

1 x Breadboard

8 x Jumper kab

7x LEDs (Liab yog qhov zoo tshaj vim tias nws yog xim zoo tshaj plaws LED thiab nws zoo li txias)

1x Arduino (Arduino MEGA, lossis Arduino MKR1000)

1x USB cable rau Arduino

(XAV KOM: Lub koob yees duab los yees duab kom xa mus rau phooj ywg!:)

Kauj Ruam 1: Tsim Array:

Tsim lub Array
Tsim lub Array

Cov kauj ruam no yog qhov yooj yim. Solder 7 LEDs ua ke, txhua Cathode/Negative pins ua ke. Qhov ntawd yog nws. Koj yuav tsum muaj ib tus GND ceg txuas nrog txhua tus cathodes ntawm LEDs, thiab ib qho Anode/Tus lej zoo los ntawm txhua LED tsuas yog ntab hauv nruab nrab cua.

Kauj Ruam 2: Txuas Cov Hluav Taws Xob rau Arduino: (MKR1000)

Txuas Cov Hluav Taws Xob rau Arduino: (MKR1000)
Txuas Cov Hluav Taws Xob rau Arduino: (MKR1000)

Tam sim no, yog tias koj siv Arduino MKR1000, tom qab ntawd nrog kuv. Yog tias koj siv MEGA, hla mus rau kauj ruam tom ntej.

Ua ntej, txuas GND los ntawm koj MKR1000 rau koj 220 ohm resistor (s). (ntau dua, zoo dua!) Tom qab ntawd, txuas rau lwm qhov kawg ntawm tus tiv thaiv (s) mus rau Cathode ntawm tag nrho koj cov LEDs. Zoo kawg koj yuav luag nyob ntawd! Tam sim no, ntawm Arduino MKR1000, lawv yog 7 tus pin, 1 txog 7, tsis suav nrog 0. Yog li, txuas koj cov LEDs kom raug (piv txwv li. 1st LED rau 1, 2nd LED rau 2, thiab lwm yam) Thaum koj ua tiav, koj cov xov hlau yuav tsum saib tej yam zoo li no:

Qee cov duab ntxiv: IMAGES !!!!!!!

Kauj Ruam 3: Txuas Cov Hluav Taws Xob rau Arduino: (MEGA)

Txuas Cov Hluav Taws Xob rau Arduino: (MEGA)
Txuas Cov Hluav Taws Xob rau Arduino: (MEGA)
Txuas Cov Hluav Taws Xob rau Arduino: (MEGA)
Txuas Cov Hluav Taws Xob rau Arduino: (MEGA)
Txuas Cov Hluav Taws Xob rau Arduino: (MEGA)
Txuas Cov Hluav Taws Xob rau Arduino: (MEGA)

Hauv theem no, peb yuav txuas cov xov hlau los ntawm LEDs mus rau Arduino MEGA. Yog tias koj siv Arduino MKR1000, rov mus ib kauj ruam.

Arduino MEGA txoj kev txuas xov tooj zoo ib yam li ArduinoMKR1000's. (Cov ntsiab lus hauv kab lus yog "zoo sib xws", Yog li tsis txhob cuam tshuam qhov no, thiab xyuam xim!) Pib tawm los ntawm kev txuas GND ntawm MEGA mus rau 220 ohm resistor (s). (Qhov ntau resistors, zoo dua!) Tom qab ntawd, txuas rau lwm qhov kawg ntawm tus tiv thaiv (s) rau txhua Cathodes ntawm koj cov LEDs. Yay! Koj tau txais los ntawm qhov yooj yim tshaj plaws! Tam sim no, qhov no yog qhov uas nws ua rau me ntsis lo qhia. Peb yuav siv tus pin 2 txog 8 rau txoj haujlwm no. Txuas koj cov LEDs kom raug. (ex. 1st LED rau pin2, 2nd LED rau pin3, thiab lwm yam) Thaum koj tau ua tiav qhov no, koj nyob hauv tsev ncab !!!

Nov yog qee cov duab ntxiv uas yuav pab tau: IMAGES !!!!!!!

Kauj Ruam 4: Code Rau: ARDUINO MKR1000

Nov yog tus lej: MKR1000

Kauj Ruam 5: Code Rau: ARDUINO MEGA

Nov yog tus lej: MEGA

Kauj Ruam 6: Sijhawm Xeem

Nyob zoo! Koj ua tiav! Tsis txhob tau txais kev zoo siab heev, peb tseem yuav tsum sim nws! Cias ntsaws nws siv USB cable, lossis siv lub zog siv hluav taws xob sab nraud. Nws puas ua haujlwm raug? Yog tias koj tsis paub tseeb tias nws ua haujlwm raug, txheeb xyuas qib tom ntej kom pom cov vis dis aus ntawm nws ua haujlwm raug!

Kauj ruam 7: Txhua yam ua tiav

Txheeb tawm qhov no! Nws ua haujlwm

Pom zoo: