Bajardi: Olimjonov Xasanboy Tekshirdi: Xoldorov Shohruhmirzo Fan
Download 328.04 Kb.
|
O\'rnatilgan tizimlar 1 topshiriq Olimjonov Xasanboy 831 20
- Bu sahifa navigatsiya:
- Qisqacha nazariy ma’lumotlar Arduino
O‘ZBEKISTON RESPUBLIKASI AXBOROT TEXNOLOGIYALARI VA KOMMUNIKATSIYALARINI RIVOJLANTIRISH VAZIRLIGI MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI Amaliy ish 1 Mavzu: Jarayonlarni controller yordamida tashkil etish Bajardi: Olimjonov Xasanboy Tekshirdi: Xoldorov Shohruhmirzo Fan: O’rnatilgan tizimlar Topshiriq 1. Jarayonlarni controller yordamida tashkil etish Vazifalar: 1. Led diodlar yordamida jarayon tashkil etish 2. Tugma yordamida jarayon tashkil etish 3. Potentsiometr yordamida jarayon tashkil etish Qoidalar: 1. Topshiriq mavzusiga mos ishni yuklash kerak 2. Saytga yuklangan ishni dars vaqtida himoya qilish kerak 3. Himoya qilinmagan va original bo’lgan ishlarga umumiy ballning 50% qo’yiladi. 4. Vazifalar hamma uchun bir xil lekin xar bir odamning o’z fikrida farq bo’lgani kabi sihida ham farq bo’ladi. 5. Chizmalar nomlanishi shart. 6. Keying listda ilova keltirilgan. Qisqacha nazariy ma’lumotlar Arduino - har kimga turli xil elektromexanik qurilmalarni yaratishga imkon beradigan elektron qurilma. Arduino dasturiy va texnik vositalardan iborat. Dasturiy ta'minot qismiga ilovani ishlab chiqish muhiti (dasturiy ta'minotni yozish va tuzatish dasturi), ko‘plab tayyor va qulay kutubxonalar, soddalashtirilgan dasturlash tili kiradi. Uskuna qismi mikrokontrollerlarning katta qatorini va ular uchun tayyor modullarni o‘z ichiga oladi. Bu Arduino bilan ishlashni juda osonlashtiradi! Arduino - bu qo‘shimcha komponentlarni ulash uchun kontaktlari bo‘lgan qurilma. Qurilmaning texnik xususiyatlari ishlatilgan mikrokontroller modeliga bog‘liq. Bu qo‘shimcha komponentlar mosligi bilan bog‘liq. Dastur kodi protsessorga o‘rnatilgan qurilma tufayli platformaning o‘ziga yoziladi. Shu bilan birga, loyihani kompyuterdan simli yoki simsiz ma'lumot manbalari yordamida amalga oshirish mumkin. LEDning nominal oqimiga olib keladigan p-n o'tish joyida oldinga kuchlanish pasayishi. Anod katodga nisbatan ijobiy potentsialda bo'lishi uchun LEDga kuchlanish qo'llaniladi. Yarimo'tkazgichning kimyoviy tarkibiga, optik nurlanishning to'lqin uzunligiga qarab, ulanish joyidagi to'g'ridan-to'g'ri kuchlanish tushishi ham farqlanadi. Aytgancha, yarimo'tkazgichning kimyoviy tarkibi to'g'ridan-to'g'ri kuchlanish pasayishidan aniqlanishi mumkin. Va bu erda turli to'lqin uzunliklari uchun to'g'ridan-to'g'ri kuchlanish pasayishining taxminiy diapazonlari (LED yorug'lik ranglari): Vazifa 1
Dastur kodi: // C++ code // OLIMJONOV XASANBOY void setup() { pinMode(13, OUTPUT); pinMode(12, OUTPUT); pinMode(11, OUTPUT); pinMode(10, OUTPUT); pinMode(9, OUTPUT); pinMode(8, OUTPUT); pinMode(7, OUTPUT); pinMode(6, OUTPUT); pinMode(A0, OUTPUT); pinMode(A1, OUTPUT); pinMode(A2, OUTPUT); pinMode(A3, OUTPUT); pinMode(A4, OUTPUT); pinMode(A5, OUTPUT); pinMode(5, OUTPUT); pinMode(4, OUTPUT); } void loop() { digitalWrite(13, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(13, LOW); digitalWrite(12, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(12, LOW); digitalWrite(11, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(11, LOW); digitalWrite(10, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(10, LOW); digitalWrite(11, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(11, LOW); digitalWrite(9, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(9, LOW); digitalWrite(8, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(8, LOW); digitalWrite(7, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(7, LOW); digitalWrite(6, HIGH); delay(100); // Wait for 100 millisecond(s) digitalWrite(6, LOW); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(A0, HIGH); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(A0, LOW); digitalWrite(A1, HIGH); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(A1, LOW); digitalWrite(A2, HIGH); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(A2, LOW); digitalWrite(A3, HIGH); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(A3, LOW); digitalWrite(A4, HIGH); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(A4, LOW); digitalWrite(A5, HIGH); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(A5, LOW); digitalWrite(5, HIGH); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(5, LOW); digitalWrite(4, HIGH); delay(1000); // Wait for 1000 millisecond(s) digitalWrite(4, LOW); } Dastur bajarilganligi rasm: Dastur linki: https://www.tinkercad.com/things/hcDrsHippaB-brilliant-inari-robo/editel?sharecode=i_l8S73bF5FmKxVtDpFuQPaXHQ9t6LxHiHs-sOuxb7M Vazifa 2
#define LED_1_PIN 11 #define LED_2_PIN 10 #define LED_3_PIN 9 #define BUTTON_PIN 4 //olimjonov xasanboy void setup(){ pinMode(LED_1_PIN, OUTPUT); pinMode(LED_2_PIN, OUTPUT); pinMode(LED_3_PIN, OUTPUT); pinMode(BUTTON_PIN, INPUT_PULLUP);} void loop(){ byte buttonState = digitalRead(BUTTON_PIN); if (buttonState == LOW) { digitalWrite(LED_1_PIN, HIGH); digitalWrite(LED_2_PIN, HIGH); digitalWrite(LED_3_PIN, HIGH); } else { digitalWrite(LED_1_PIN, LOW); digitalWrite(LED_2_PIN, LOW); digitalWrite(LED_3_PIN, LOW); } } Ishlagan dastur rasmi: Dastur linki: https://www.tinkercad.com/things/jz13z4NNavv-brave-hango/editel?sharecode=hKn3SsMa-hVSDQqi0alkenuR8mRIb5pIAs4Bd_HhVYM&sharecode=hKn3SsMa-hVSDQqi0alkenuR8mRIb5pIAs4Bd_HhVYM Vazifa 3
// C++ code // olimjonov xasanboy void setup() { pinMode(7, INPUT); pinMode(A0, INPUT); pinMode(8, OUTPUT); Serial.begin(9600); } void loop() { if (digitalRead(7) == 1 && analogRead(A0) > 500) { digitalWrite(8, HIGH); } else { digitalWrite(8, LOW); } Serial.println(analogRead(A0)); Serial.println(digitalRead(7)); delay(10); // Delay a little bit to improve simulation performance } Ishlagan dastur rasmi: Dastur linki: https://www.tinkercad.com/things/fGJsXxVUgfj-grand-uusam/editel?sharecode=8dp-EHJpEvMmUDoAGvCOr5WY0h7oLTqOK4vVoVpn50g&sharecode=8dp-EHJpEvMmUDoAGvCOr5WY0h7oLTqOK4vVoVpn50g Xulosa Men bu topshiriqni bajarish davomida Arduino nimaligini unda nimalar qilish mimkinligi haqida boshlang’ich tushunchaga ega bo’ldim. Ya’ni Arduino har bitta insonga turli xil elektromexanik qurilmalarni yaratishga imkon beradigan elektron qurilma hisoblanarkan. Bu amaliyotni qilayotganimda men led (lampalari) bilan ishlash button(tugma) bilan ishlashni o’rganib oldim.Keyin potentiometr haqidam ham tushunchaga ega bo’ldim. Download 328.04 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling