Laboratoriya ishi uchun topshiriqlar.
Assalomu alaykum Hurmatli talabalar
Ushbu Laboratoriya mashg’ulotida Har biringiz quydagi dasturni o‘rnatib O‘z Ism Familiyangizni dastur muhitida izoh sifatida yozib topshiring
Qo’shimcha topshiriq
Mashina povorodnigini yasash.
Dasturiy qismi:
//povorot
int q7=7;
int q6=6;
int q5=5;
void setup()
{
pinMode(q7, OUTPUT);
pinMode(q6, OUTPUT);
pinMode(q5, OUTPUT);
}
void loop()
{
digitalWrite(q7, HIGH);
delay(2000); // 1 sekund kutish second(s)
digitalWrite(q6, HIGH);
delay(2000); // 1 sekund kutish second(s)
digitalWrite(q5, HIGH);
delay(2000); // 1 sekund kutish second(s)
digitalWrite(q7, LOW);
digitalWrite(q6, LOW);
digitalWrite(q5, LOW);
}
Dostları ilə paylaş: |