Sxemotexnika va robototexnika asoslari


-topshiriq Arduinoning 6-oyoqchasiga bog’lagan holatda svetadiodni yoqing?


Download 4.43 Mb.
bet3/4
Sana15.11.2023
Hajmi4.43 Mb.
#1773717
1   2   3   4
Bog'liq
Ma\'ruza 1

1-topshiriq

Arduinoning 6-oyoqchasiga bog’lagan holatda svetadiodni yoqing?

2-topshiriq

Arduinoning 2-piniga bog’lagan holatda svetadiodni 2 sekund yoqing va 1 sekund o’chiring?

3-topshiriq

2 ta svetadiodni arduinoning 5 va 6- piniga ulagan holatda 1 sekund vaqt bilan yoqib o’chiring?

4-topshiriq

2 ta svetadiodni arduinoning 5 va 6-piniga ulagan holatda ikkala svetadiod parallel yonsin va parallel o’chsin 1 soniyadan ?

5-topshiriq

3 ta svetadiodni arduinoning 2,3 va 4-piniga ulagan holatda uchala svetadiod 2 soniyadan parallel yonsin va parallel o’chsin?

6-topshiriq

4 ta svetadiodni arduinoning 2,3,4 va 5-piniga ulagan holatda to’rtala svetadiod 1 soniyadan parallel yonsin va parallel o’chsin?

Uyga topshiriqlar

1. Bitta svetodiodni bir sekund bilan yoqib-o’chirish uchun nechta buyruqdan foydalandik?

digitalWrite____ta + delay____ta=jami_____buyruq.

2. 3ta svetodiodni birinchisi 2 sekund yonib,1sekund o’chib tursin,ikkinchisi 1sekund yonib turib ,3sekund o’chib tursin, uchinchisi esa 0,5 sekund yonib , 2,5 sekund o’chib tursin.

void setup(){

pinMode(2,______________);pinMode(__,OUTPUT);

____________ (4,OUTPUT); }

void loop(){

digitalWrite(___,___);delay(______);

digitalWrite(___,___);delay(______);

digitalWrite(___,___);delay(______);

digitalWrite(___,___);delay(______);

digitalWrite(___,___);delay(______);

digitalWrite(___,___);delay(______); }

3. Bitta svetodiod avval 0,5 sekund yonib ,0,5 sekund o’chadi, keyin 1 sekund yonib 1sekund o’chadi, undan keyin 2 sekund yonib 2 sekund o’chib turadi.

void setup() {

____________(2,______________); }

void loop() {

digitalWrite(___,___);delay(___________);


Download 4.43 Mb.

Do'stlaringiz bilan baham:
1   2   3   4




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