Tekshirdi: Xoldorov Shohruhmirzo Fan: O’rnatilgan tizimlar 2-topshiriq. Vazifalar


https://www.tinkercad.com/things/l9xn9m2uZIk-funky-esboo/editel?sharecode=oOr8kZk9Lzrq4e2iDkZwGMtkXKs0yEq9y6xsO1qb-Vo



Download 1 Mb.
bet2/2
Sana05.05.2023
Hajmi1 Mb.
#935459
1   2
Bog'liq
O\'rnatilgan tizimlar 2 Abdumaliokov.N

https://www.tinkercad.com/things/l9xn9m2uZIk-funky-esboo/editel?sharecode=oOr8kZk9Lzrq4e2iDkZwGMtkXKs0yEq9y6xsO1qb-Vo

const int pinLed1=3;


const int pinLed2=6;
const int pinLed3=5;

const int pinPotenciometrLed1=A0;


const int pinPotenciometrLed2=A1;
const int pinPotenciometrLed3=A2;

int valorLed1;


int valorLed2;
int valorLed3;

int led1;


int led2;
int led3;

void setup(){


pinMode(pinLed1,OUTPUT);
pinMode(pinLed2,OUTPUT);
pinMode(pinLed3,OUTPUT);
}
void loop(){
valorLed1=analogRead(pinPotenciometrLed1);
valorLed2=analogRead(pinPotenciometrLed2);
valorLed3=analogRead(pinPotenciometrLed3);
led1=map(valorLed1,0,1023,0,255);
led2=map(valorLed2,0,1023,0,255);
led3=map(valorLed3,0,1023,0,255);
analogWrite(pinLed1,led1);
analogWrite(pinLed2,led2);
analogWrite(pinLed3,led3);
delay(100);
}

2. 1 razryad 7 segmentli indikator yordamida jarayonlarni boshqarish.

https://www.tinkercad.com/things/eJVj00YjZN4-cool-jaiks/editel?sharecode=wBAuuTOFvcc0PVwa53w-LcHNrFf5VwHoF_kDP3ypiY4

3. 4 razryadli 7 segmentli indikator yordamida jarayonlarni boshqarish.
https://www.tinkercad.com/things/lzXeBLR8jDd-swanky-jaagub/editel?sharecode=ROf6kR4HmciwhU_MIxxao6lyX1I_IUO9mAWrlalfdrk
char a=2;
char b=3;
char c=4;
char d=5;
char e=6;
char f=7;
char g=8;

char digit1 = 13;


char digit2 = 12;
char digit3 = 11;
char digit4 = 10;

char Number[10] ={


0b1111110, // 0
0b0110000, // 1
0b1101101, // 2
0b1111001, // 3
0b0110011, // 4
0b1011011, // 5
0b1011111, // 6
0b1110000, // 7
0b1111111, // 8
0b1111011, // 9
};

void display(int n)


{
digitalWrite(a, (Number[n] & 0b1000000));
digitalWrite(b, (Number[n] & 0b0100000));
digitalWrite(c, (Number[n] & 0b0010000));
digitalWrite(d, (Number[n] & 0b0001000));
digitalWrite(e, (Number[n] & 0b0000100));
digitalWrite(f, (Number[n] & 0b0000010));
digitalWrite(g, (Number[n] & 0b0000001));
}

void offdisplay()


{
digitalWrite(digit1, 1);
digitalWrite(digit2, 1);
digitalWrite(digit3, 1);
digitalWrite(digit4, 1);
}

void setup()


{
pinMode(a, OUTPUT);
pinMode(b, OUTPUT);
pinMode(c, OUTPUT);
pinMode(d, OUTPUT);
pinMode(e, OUTPUT);
pinMode(f, OUTPUT);
pinMode(g, OUTPUT);

pinMode(digit1, OUTPUT);


pinMode(digit2, OUTPUT);
pinMode(digit3, OUTPUT);
pinMode(digit4, OUTPUT);

}

long count = 0;



void loop()
{
count = millis() / 100;

char n1 = (count % 10000) / 1000;


char n2 = (count % 1000) / 100;
char n3 = (count % 100) / 10;
char n4 = count % 10;
display(n1);
digitalWrite(digit1, 0);
delay(1);
offdisplay();
display(n2);
digitalWrite(digit2, 0);
delay(1);
offdisplay();
display(n3);
digitalWrite(digit3, 0);
delay(1);
offdisplay();
display(n4);
digitalWrite(digit4, 0);
delay(1);
offdisplay();
}
Xulosa
Biz 2-amaliy ishda RGB led, 1 razryad 7 segmentli indicator va 4 razryad 7 segmentli indikatorlar haqida toliq axborotga ega boldik, va ular qayerlarda ishlatilishin hozirgi kunda ularga etibor kattaligin bildik. Ularni Tinkercad dasturi orqali blok shemasin va qanaqa kodlar orqali ulanishin bilib oldik.
Download 1 Mb.

Do'stlaringiz bilan baham:
1   2




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