Guruh Topshiriq F. I. O


LABORATORIYA UCHUN TOPSHIRIQLAR



Download 1,2 Mb.
bet2/13
Sana29.05.2022
Hajmi1,2 Mb.
#619426
1   2   3   4   5   6   7   8   9   ...   13
Bog'liq
2-DETLINE

LABORATORIYA UCHUN TOPSHIRIQLAR

  1. Potensiometr qiymatini arduino platformasini tashlash.





Dasturiy qismi:


// C++ code
//
/*
Analog Input Demonstrates analog input by
reading an analog sensor on analog pin 0 and
turning on and off a light emitting diode(LED)
connected to digital pin 13. The amount of time
the LED will be on and off depends on the value
obtained by analogRead().


The circuit:
* Potentiometer attached to analog input 0
* center pin of the potentiometer to the analog
pin
* one side pin (either one) to ground
* the other side pin to +5V
* LED anode (long leg) attached to digital
output 13
* LED cathode (short leg) attached to ground
* Note: because most Arduinos have a built-in
LED attached to pin 13 on the board, the LED is
optional.


Created by David Cuartielles
modified 30 Aug 2011 By Tom Igoe


This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/AnalogInput
*/


int sensorValue = 0;


void setup()
{
pinMode(A0, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
}


void loop()
{
// read the value from the sensor
sensorValue = analogRead(A0);
// turn the LED on
digitalWrite(LED_BUILTIN, HIGH);
// stop the program for the
// milliseconds
delay(sensorValue); // Wait for sensorValue millisecond(s)
// turn the LED off
digitalWrite(LED_BUILTIN, LOW);
// stop the program for the
// milliseconds
delay(sensorValue); // Wait for sensorValue millisecond(s)
}



Download 1,2 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   13




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