Csp1312-Individual loyiha 1 uchun talablar


Foydalanilgan Internet resurslari


Download 0.81 Mb.
bet16/16
Sana02.01.2022
Hajmi0.81 Mb.
#192016
1   ...   8   9   10   11   12   13   14   15   16
Bog'liq
Loyiha ishi uchun NAMUNA

Foydalanilgan Internet resurslari.

  1. http://sunny.ccas.ru/library.html – Jahon kutubxonalari serveri. 45ta mamlakatning 1000 ortiq kutubxonalariga kirishni ta'minlaydi.

  2. http://www.intel.ru – Zamonaviy texnik vositalarni ishlab chiqish va tarqatish bilan shug'ullanuvchi AQSh Intel firmasining serveri.

  3. http://www.mesi.ru – Moskva iqtisodiyot, statistika va informatika universitetining serveri.

ILOVALAR.

Ilova 1

#include servo.h

int servoPin = 9;

Servo servo;

int servoAngle = 0; // servoning boshlang'ich pazitsiyasi

void setup()

{

Serial.begin(9600);

servo.attach(servoPin);

}

void loop()

{

//servo yo'nalishini va holatini boshqarish.
servo.write(45); // SG90 servoni 45 gradusgacha burish

delay(1000); // kutish vaqti 1 sekund

servo.write(90); // SG90 servoni 90 gradusgacha burish

delay(1000); // kutish vaqti 1 sekund

servo.write(135); // SG90 servoni 135 gradusgacha burish

delay(1000); // kutish vaqti 1 sekund

servo.write(90); // SG90 servoni 90 gradusgacha qaytarish

delay(1000);

//Servoning tezligini nazorat qilish

for(servoAngle = 0; servoAngle < 180; servoAngle++)

// Servoni 0 gradusdan 180 gradusga burish

{

servo.write(servoAngle);

delay(50);

}
for(servoAngle = 180; servoAngle > 0; servoAngle--)

// Servoni 0 gradusdan 180 gradusga burish
{

servo.write(servoAngle);

delay(10);

}

}


Ilova 2

#include

LiquidCrystal lcd(1, 2, 4, 5, 6, 7);

// Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)


const int trigPin = 9;

const int echoPin = 10;


long duration;

int distanceCm, distanceInch;


void setup() {

lcd.begin(16,2);

(width and height) of the display
pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

}
void loop() {

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);


duration = pulseIn(echoPin, HIGH);

distanceCm= duration*0.034/2;

distanceInch = duration*0.0133/2;
lcd.setCursor(0,0); // Sets the location at which subsequent text written to the LCD will be displayed

lcd.print("Distance: "); // Prints string "Distance" on the LCD

lcd.print(distanceCm); // Prints the distance value from the sensor

lcd.print(" cm");

delay(10);

lcd.setCursor(0,1);

lcd.print("Distance: ");

lcd.print(distanceInch);

lcd.print(" inch");

delay(10);



}





Download 0.81 Mb.

Do'stlaringiz bilan baham:
1   ...   8   9   10   11   12   13   14   15   16




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling