LABORATORIYA ISHI UCHUN TOPSHIRIQLAR.
RGB diod orqali qora rangni hosil qiling va uni 2 sekund davomida ko’kka almashtiring.
Dasturiy qismi:
int a=12;
int b=11;
int c=10;
void stup()
{
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);
}
Do'stlaringiz bilan baham: |