Mavzu: O’rnatilgan tizimlar faniga kirish Bajardi: Sayitov Shaxboz Tekshirdi
Download 110.01 Kb.
|
4-lab Embedded Systems
- Bu sahifa navigatsiya:
- Guruh
- Kerakli jihozlar
O’ZBEKISTON RESPUBLIKASI AXBOROT TEXNOLOGIYALARI VA KOMMUNIKATSIYALARINI RIVOJLANTIRISH VAZIRLIGI MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALAR UNIVERSITETI “O’rnatilgan tizimlar” fanidan Mavzu: O’rnatilgan tizimlar faniga kirish Bajardi: Sayitov Shaxboz Tekshirdi: Begmatov Shohruh Guruh: 210-19 Toshkent-2022 4-laboratoriya ishi Potensiometr. Arduino orqali yorug‘lik diodini yorug‘lik darajasini o‘zgartirishini namoyish etish Ishdan maqsad: O’rnatilgan tizimlarda analog kiritish va chiqarishni dastur yordamida boshqarishni o’rganish. Analog-raqamli hamda raqamli-analog o’zgartirgich apparat va dasturiy vositalari bilan ishlashga ko’nikma hosil qilish. Kerakli jihozlar: Arduino UNO R3, led lampalar, maket plata,potensiometr Analog Digital Conversation min kuchlanish: x – 0.9 V 1023 – 5 V x = 1023*0.9/5 = 184.14= ~184 max kuchlanish: x – 4.1V 1023 – 5 V x = 1023*4.1/5 = 838.86= ~839 Pulse Wide Modulation min kuchlanish: x – 3.4 V 255 – 5 V x = 255*3.4/5 =173.4=~173 max kuchlanish: x – 4.5 V 255 – 5 V x = 255*4.5/5 = 229.5= ~230 int sensorValue = 0; int outputValue = 0; void setup() { pinMode(9, OUTPUT); } void loop() { sensorValue = analogRead(A1); if(sensorValue <184) digitalWrite(10,LOW); else if(sensorValue >839) digitalWrite(10,HIGH); else{ outputValue = map(sensorValue, 184, 839, 173, 230); analogWrite(9, outputValue); } delay(5); } https://www.tinkercad.com/things/hmIeTrlr6qG-tremendous-lahdi/editel?sharecode=WN8owBruk2-thBOdu4UUewJNaYwlLeavS0vr2ePixWY Download 110.01 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling