MUHAMMAD AL-XORAZMIY NOMIDAGI
TOSHKENT AXBOROT TEXNOLOGIYALARI
UNIVERSITETI SAMARQAND FILIALI
"O’rnatilgan tizimlar” fanidan
Bajardi: KIS102-19 - guruh talabasi
Muxtorov B.
Qabul qildi: Saidqulov E.
SAMARQAND – 2023
1-labaratoriya ishi
1.3 ta svetodiod berilgan.Birinchisi 2 sekund yonib,1 sekund o’chib tursin.Ikkinchisi 1 sekund yonib,3 sekund o’chib tursin.Uchinchisi 1 sekund yonib 5 sekund o’chsin.
int led1 = 8;
int led2 = 7;
int led3 = 6;
void setup()
{
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
}
void loop()
{
digitalWrite(led1, HIGH);
delay(2000);
digitalWrite(led1, LOW);
delay(1000);
digitalWrite(led2, HIGH);
delay(1000);
digitalWrite(led2, LOW);
delay(3000);
digitalWrite(led3, HIGH);
delay(1000);
digitalWrite(led3, LOW);
delay(5000);
digitalWrite(led4, LOW);
delay(1000);
}
Do'stlaringiz bilan baham: |