Cov txheej txheem:

Tswj Lub Teeb Tsav Tsheb Siv Arduino: 3 Kauj Ruam
Tswj Lub Teeb Tsav Tsheb Siv Arduino: 3 Kauj Ruam

Video: Tswj Lub Teeb Tsav Tsheb Siv Arduino: 3 Kauj Ruam

Video: Tswj Lub Teeb Tsav Tsheb Siv Arduino: 3 Kauj Ruam
Video: Qhia txuas xaim hluav taws xob daim: 02 2024, Hlis ntuj nqeg
Anonim
Tswj Lub Teeb Tsav Tsheb Siv Arduino
Tswj Lub Teeb Tsav Tsheb Siv Arduino

Qhov no yog daim phiaj ua mov ci raws txoj haujlwm uas siv Atmel Atmega 2560 (Arduino Mega) los ua tus tswj lub teeb pom kev.

Lub sijhawm RED thiab XEEB LED tau teeb tsa rau 15 Thib Ob. Lub sijhawm daj daj tau teeb tsa rau 1 Thib Ob. Peb tuaj yeem teeb tsa koj tus kheej lub sijhawm los ntawm kev hloov kho Arduino code.

Tsis tas li daim duab "phiaj xwm" tau txuas nrog txoj haujlwm los pab kom nkag siab txog kev faib cov teeb tsheb.

Lub cathode ntawm txhua qhov LED tau txuas nrog ib leeg. Nws txhais tau tias lawv txhua tus muaj qib hauv av. Cov lej txuas kuj tseem tuaj yeem hloov kho rau lwm yam khoom Arduino.

Kauj ruam 1: Yuav tsum tau ua

Cov hauv qab no yuav tsum ua kom tiav txoj haujlwm no:

1- Arduino Mega lossis UNO 2- Plaub Liab LED's

3- Plaub Daj LED's

4- Plaub Blue lossis Green LED's

Kauj Ruam 2: Pin-outs & thaiv

Pin-outs & Txuas
Pin-outs & Txuas
Pin-outs & Txuas
Pin-outs & Txuas

Tus Pin-outs & Kev thaiv ntawm Arduino Mega lossis Arduino UNO thiab lwm yam khoom siv txuas nrog cov kauj ruam no, thiab tseem muab cov hauv qab no:

==============

Arduino => LED's ==============

8 => L3 (Xiav), L4 (Xiav)

9 => L3 (Daj), L4 (Daj)

10 => L3 (Liab), L4 (Liab)

11 => L1 (Xiav), L2 (Xiav)

12 => L1 (Daj), L2 (Daj)

13 => L1 (Liab), L2 (Liab)

GND => Txhua qhov tsis zoo ntawm LED's

Kauj ruam 3: Upload Code

Rub tawm Txoj Cai
Rub tawm Txoj Cai

Tshaj tawm cov cai rau Arduino Mega lossis Arduino UNO kom tau txais koj cov zis ntawm LED's.

Cov ntaub ntawv Arduino.ino kuj tau txuas nrog cov kauj ruam no.

Pom zoo: