NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include <LiquidCrystal.h> // LCD kütüphanesi
#include <SoftwareSerial.h> // Seri haberleşme kütüphanesi
#include <Servo.h> // Servo motor kütüphanesi
SoftwareSerial mySerial(0, 1); // Seri haberleşme pinleri ve nesnesi
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // LCD pinleri ve nesnesi
int led0=13; // Doğru parola ikinci ledi
int time=500; // Gecikme değeri
char motor = 'N'; // Motor çalışma durumu kontrolü
char parola[]="5678"; // İlk parola
char parola2[]="2345"; // İkinci parola
char kod[4]; // Girilen keypad kodu dizisi
int cont=0;

Servo myservo; // Servo motor nesnesi
void setup()
{
//Led çıkış pini
pinMode(led0, OUTPUT);
// Motor sürücü entegresi çıkış pinleri
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
//digitalWrite(8, HIGH);//Motor entegresini kullanabilmek için HIGH değeri verildi
myservo.attach(9); // Servo motora 9 nolu pin atandı
mySerial.begin(9600); // Seri haberleşme başlatıldı
lcd.begin(16, 2); // LCD başlatıldı
lcd.print("Sifreyi Girin"); // Ekrana şifreyi girin metni yazıldı ve 500 ms gecikme eklendi
}

void loop()
{

delay(500); // 500 ms gecikme eklendi
lcd.clear(); // LCD temizlendi ( Şifreyi girin metni )
if (mySerial.available())
{

kod[cont]=mySerial.read(); // Diğer arduino'dan gelen keypad değeri okundu
lcd.print(kod); // Okunulan değer LCD'ye yazıldı
cont=cont+1; // Sayaç 1 artırıldı

if(cont==4) // 4 hanenin de girilip girilmediği kontrol edildi
{
digitalWrite(led0,HIGH); // Eğer 4 hane de girildiyse ikinci boarddaki led yandı
delay(time); // 500 ms gecikme ayarlandı
digitalWrite(7, HIGH);
digitalWrite(6, LOW);
delay(200); // Sırasıyla 7 ve 6 nolu pinlere HIGH ve LOW değerleri verildi
digitalWrite(7, LOW);
digitalWrite(6, HIGH);

if(kod[0]==parola[0]&&kod[1]==parola[1]&&kod[2]==parola[2]&&kod[3]==parola[3])
{
lcd.setCursor(0, 1);
lcd.print("Ilk Parola!"); // İlk parola girildiyse ekrana İlk parola değeri yazıldı
motor = 'N';
}

else if(kod[0]==parola2[0]&&kod[1]==parola2[1]&&kod[2]==parola2[2]&&kod[3]==parola2[3])
{

motor = 'Y';
digitalWrite(led0,HIGH); // İkinci parola değeri girildiyse ekrana ikinci parola değeri yazıldı ve servo motora açı verildi
delay(time);
//digitalWrite(8, HIGH);
// digitalWrite(6, HIGH);
//digitalWrite(7, LOW); // DC motor çevirildi
//delay(20);
//digitalWrite(7, LOW);
//digitalWrite(6, HIGH);
int adc = analogRead(A0); // Potansiyometre okundu
int aci = map(adc, 0, 1023, 0, 180); // okuma 0 ile 180 arasında bir değere ölçeklendirildi
myservo.write(aci); // Açı değeri servo motora iletildi
Serial.print("Aci: ");
Serial.println(aci);
delay(10);
lcd.setCursor(0, 1);
lcd.print("Ikinci Parola!"); // LCD'ye Ikinci parola değeri yazıldı
}
else
{

digitalWrite(led0,LOW); // Parola yanlışsa led söndü ve Sifre yanlis değeri yazıldı
delay(1000);
lcd.setCursor(0, 1);
lcd.print("Sifre Yanlis!");
motor = 'N';
}
cont=0; // Sayaç sıfırlandı
}

}

if( motor == 'Y' ){
int adc = analogRead(A0); // Potansiyometre değeri okundu
int aci = map(adc, 0, 1023, 0, 180); // okuma 0 ile 180 arasında bir değere ölçeklendirildi
myservo.write(aci); // Servo motora açı verildi
digitalWrite(8, LOW);
} else{
digitalWrite(8, HIGH);
digitalWrite(6, HIGH);
digitalWrite(7, LOW); // DC motor çevirildi
}

}
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.