Laboratoriya ishi №13. Yetti segmentli bitta raqamli ko‘rsatkich. Laboratoriya ishining maqsadi



Download 253,4 Kb.
bet4/11
Sana01.06.2023
Hajmi253,4 Kb.
#947346
1   2   3   4   5   6   7   8   9   10   11
Laboratoriyaning amaliy qismi.



Ushbu model uchun quyidagi dastur mos keladi:
// C++ code
//
int b1 = 0;
int b2 = 0;
int A = 2;
int B3 = 3;
int C4 = 4;
int D5 = 5;
int E6 = 6;
int F7 = 7;
int G8 = 8;

void setup()


{
pinMode(9, INPUT);
pinMode(10, INPUT);
pinMode (A,OUTPUT);
pinMode (B3,OUTPUT);
pinMode (C4,OUTPUT);
pinMode (D5,OUTPUT);
pinMode (E6,OUTPUT);
pinMode (F7,OUTPUT);
pinMode (G8,OUTPUT);
}

void loop()


{
b1=digitalRead(9);
b2=digitalRead(10);
Serial.println(b1);
Serial.println(b2);
if(b1==1)
{
digitalWrite(B3,HIGH);
digitalWrite(C4,HIGH);
delay(1000);
digitalWrite(A,LOW);
digitalWrite(D5,LOW);
digitalWrite(E6,LOW);
digitalWrite(F7,LOW);
digitalWrite(G8,LOW);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,HIGH);
digitalWrite(D5,HIGH);
digitalWrite(C4,LOW);
digitalWrite(F7,LOW);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,LOW);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,LOW);
delay(1000);
digitalWrite(A,LOW);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,LOW);
digitalWrite(D5,LOW);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,LOW);
digitalWrite(G8,HIGH);
digitalWrite(E6,LOW);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,LOW);
digitalWrite(G8,HIGH);
digitalWrite(E6,HIGH);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,LOW);
digitalWrite(E6,LOW);
digitalWrite(D5,LOW);
digitalWrite(C4,HIGH);
digitalWrite(F7,LOW);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,HIGH);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,LOW);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
}
if(b2==1)
{
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,LOW);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,HIGH);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,LOW);
digitalWrite(E6,LOW);
digitalWrite(D5,LOW);
digitalWrite(C4,HIGH);
digitalWrite(F7,LOW);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,LOW);
digitalWrite(G8,HIGH);
digitalWrite(E6,HIGH);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,LOW);
digitalWrite(G8,HIGH);
digitalWrite(E6,LOW);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,LOW);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,LOW);
digitalWrite(D5,LOW);
digitalWrite(C4,HIGH);
digitalWrite(F7,HIGH);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,LOW);
digitalWrite(D5,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(F7,LOW);
delay(1000);
digitalWrite(A,HIGH);
digitalWrite(B3,HIGH);
digitalWrite(G8,HIGH);
digitalWrite(E6,HIGH);
digitalWrite(D5,HIGH);
digitalWrite(C4,LOW);
digitalWrite(F7,LOW);
delay(1000);
digitalWrite(B3,HIGH);
digitalWrite(C4,HIGH);
digitalWrite(A,LOW);
digitalWrite(D5,LOW);
digitalWrite(E6,LOW);
digitalWrite(F7,LOW);
digitalWrite(G8,LOW);
delay(1000);
}
}
Xulosa
Men bu laboratoriya ishini bajarish davomida Har xil loyihalarda Arduino yordamida yetti segmentli bitta raqamli indikatorda raqamlarni ko‘rsatishni o’rgandim.



Download 253,4 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   10   11




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

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish