Tekshirdi: Jurayev Dilshod 1-Topshiriq Vazifa
Download 0.76 Mb.
|
O\'rnatilgan tizimlar 811-20 Avazbek
- Bu sahifa navigatsiya:
- Tekshirdi
MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI 811-20 guruh talabasi Abdisalomov Avazbekning o'rnatilgan tizimlar fanidan 1-topshirig’i 16-Variant Tekshirdi: Jurayev Dilshod 1-Topshiriq Vazifa: Topshiriqlar https://wokwi.com va https://www.tinkercad.com onlayn simulyatorlarda amaliy bajarilib hisobotga ulanish sxemasi va dastur kodi ilova qilinishi zarur. Hisobotda dastlab qo‘llanilgan modul va datchiklak haqida umumiy ma’lumotlar keltirilishi va xulosa yozilishi shart.
1.1-rasm Kodi: int lamps_array[8] = {13, 12, 11, 10, 9, 8, 7, 6}; int mySwitch = 2; int step = 1; void setup() { Serial.begin(9600); for(int i=0; i<8;i++){ pinMode(lamps_array[i], OUTPUT); } pinMode(mySwitch, INPUT); } void loop() { int valuePotens = analogRead(A0); int valueSwitch = digitalRead(mySwitch); step = valueSwitch+1; Serial.print(valueSwitch); Serial.print("\n"); for(int i=1; i<=8;i+=step){ if (valuePotens>=i*1023/8){ digitalWrite(lamps_array[i-1],1);} } for(int i=1;i<= 8;i+=step){ if (valuePotens>=i*1023/8){ digitalWrite(lamps_array[i -1],0);} } } 1.2-rasm www.tinkercad.com web sahifasida ko’rish uchun link: https://www.tinkercad.com/things/kJf9a2qBi7q-avazbek-abdisalomov-1-t Download 0.76 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling