Impuls kengligining modulyatsiyasi Laboratoriya maqsadi


Download 1.84 Mb.
Sana05.05.2023
Hajmi1.84 Mb.
#1430152

Impuls kengligining modulyatsiyasi
Laboratoriya maqsadi: RGB LED ranglarini va impuls modulyatsiyasi diapazonini aralashtirishni o‘rganing
Ko‘p rangli LEDlar, yoki ular RGB deb ham ataladi, dinamik ravishda o‘zgarib turadigan orqa nuri rangini ko‘rsatish va yaratish uchun ishlatiladi. Aslida, ular uchun hech qanday alohida narsa yo‘q, keling, ular qanday ishlashini va RGB LEDlari nima ekanligini ko‘rib chiqaylik
Bu rasmda siz barcha soyalarni olish uchun ranglarni aralashtirish tamoyilini ko‘rishingiz mumkin.
RGB LEDlarini boshqarish uchun kerakli parametr qiymatini o‘rnatish kerak. Chiqishlar ma'lum o‘lchamdagi to‘rtburchaklar pulslar bilan ta'minlanadi, ular o‘rtacha oqim va o‘rtacha nashrida qiymatiga ta'sir qiladi.

Name,Quantity,Component

D1, D2, D3, D4, D5, D6, D7, D15, D16, D17, D18, D19, D20, D21,14," LED RGB"

U1,1," Arduino Uno R3"

R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, R40, R41, R42,42,"1 kΩ Resistor"

int a=12;
int b=11;
int c=10;
void setup()
{
pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
pinMode(c, OUTPUT);
}
void loop()
{
digitalWrite(a, HIGH);
delay(1000);
digitalWrite(a, LOW);
delay(1000);
digitalWrite(b, HIGH);
delay(1000);
digitalWrite(b, LOW);
delay(1000);
digitalWrite(c, HIGH);
delay(1000);
digitalWrite(c, LOW);
delay(1000);
}
Download 1.84 Mb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling