You are on page 1of 14

LAPORAN PROJECT AKHIR

D2

Judul : Aeroplane Hangar System

Deskripsi Alat : Aeroplane Hangar System merupakan system yang di buat untuk
memudahkan teknisi pesawat untuk memarkirkan pesawat kedalam hangar pesawat. Pada saat
pesawat dalam peroses mundur, akan mumcul pemberitahuan pada layar yang menginformasikan
teknisi berapa jarak pesawat dalam satuan jarak disertai suara dari buzzer yang meng indikasikan
posisi pas. Setelah selesai memarkir pesawat, pintu hangar dapat di tutup dengan memasukan
password.

Gambar Skematik :
Tabel Daftar Komponen :

Daftar Komponen

INPUT Jumlah Output Jumlah


Sensor
1 Motor Servo 1
Ultrasonic
Keypad 1 LED 2

Buzzer 1
Flow Chart :
Sketch :

///////////////////////////////////////////////////////////////////////////////////////

#include <Password.h> //http://www.arduino.cc/playground/uploads/Code/Password.zip

#include <Keypad.h> //http://www.arduino.cc/playground/uploads/Code/Keypad.zip

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

#include <Servo.h>

LiquidCrystal_I2C lcd(0x27, 20, 4); // set the LCD address to 0x27 for a 16 chars and 2 line
display

int pinGreen = 4;

int pinRed = 2;

const int trigPin = A0;

const int echoPin = A1;

const int speaker = 3;

int hiSound = 659;

int lowSound = 440;

int cm;

Password password = Password( "1131" );

const byte ROWS = 4; // Four rows

const byte COLS = 3; // Threes columns

// Define the Keymap

char keys[ROWS][COLS] = {

{'1', '2', '3'},


{'4', '5', '6'},

{'7', '8', '9'},

{'*', '0', '#'}

};

byte rowPins[ROWS] = { 6, 7, 8, 9 }; // Connect keypad ROW0, ROW1, ROW2 and ROW3 to


these Arduino pins.

byte colPins[COLS] = { 10, 11, 12 }; // Connect keypad COL0, COL1 and COL2 to these
Arduino pins.

// Create the Keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

Servo myservo;

int angle = 0;

void setup() {

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

pinMode(pinGreen, OUTPUT);

pinMode(pinRed, OUTPUT);

Serial.begin(9600);

keypad.addEventListener(keypadEvent); //add an event listener for this keypad

tone(3, 500, 1000);


delay(1500);

noTone(3);

// Print a message to the LCD.

lcd.backlight();

lcd.setCursor(0, 0);

lcd.print("FINAL PROJECT");

lcd.setCursor(0, 1);

lcd.print("= = A H S = =");

delay(3000);

lcd.clear();

lcd.setCursor(0, 0);

lcd.print(" TELKOM 4D ");

lcd.setCursor(0, 1);

lcd.print(" KELOMPOK 2 ");

delay(2000);

lcd.clear();

digitalWrite(pinRed, HIGH);

digitalWrite(pinGreen, LOW);

myservo.attach(5);
}

void loop() {

keypad.getKey();

digitalWrite(trigPin, HIGH);

delayMicroseconds(5);

digitalWrite(trigPin, LOW);

delayMicroseconds(10);

long duration = pulseIn(echoPin, HIGH);

int cm = (duration / 2) / 29.1;

vehiclewaybackwards();

//take care of some special events

void keypadEvent(KeypadEvent eKey) {

switch (keypad.getState()) {

case PRESSED:

lcd.setCursor(0, 0);

lcd.print("PASSWORD: ");

Serial.println(eKey);

switch (eKey) {

case '*': checkPassword(); break;

case '#': password.reset();

digitalWrite(pinGreen, LOW);

digitalWrite(pinRed, HIGH);
myservo.write(0);

break;

default: password.append(eKey);

void checkPassword() {

if (password.evaluate()) {

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("SUCCESS");

tone(3, 700, 1500);

delay(500);

noTone(3);

digitalWrite(pinGreen, HIGH);

digitalWrite(pinRed, LOW);

myservo.write(90);

//Add code to run if it works

} else {

lcd.clear();

lcd.setCursor(0, 0);

lcd.print("DENIED");

tone(3, 600, 1500);

delay(500);
noTone(3);

digitalWrite(pinGreen, LOW);

digitalWrite(pinRed, HIGH);

//add code to run if it did not work

void vehiclewaybackwards() {

if (cm > 50) {

digitalWrite(pinGreen, LOW);

mod1();

lcd.setCursor(0, 0);

lcd.print("Jarak: ");

lcd.setCursor(9, 0);

lcd.print(cm);

lcd.setCursor(14, 0);

lcd.print("cm");

lcd.setCursor(1, 0);

lcd.print("================");

tone(speaker, hiSound, 200);

tone(speaker, lowSound, 200);

if (cm <= 50) {


digitalWrite(pinGreen, LOW);

mod2();

lcd.setCursor(0, 0);

lcd.print("Jarak: ");

lcd.setCursor(9, 0);

lcd.print(cm);

lcd.setCursor(14, 0);

lcd.print("cm");

lcd.setCursor(1, 0);

lcd.print("== Be Careful ==");

tone(speaker, hiSound, 250);

tone(speaker, lowSound, 250);

if (cm <= 40) {

digitalWrite(pinGreen, LOW);

mod3();

lcd.setCursor(0, 0);

lcd.print("Jarak: ");

lcd.setCursor(9, 0);

lcd.print(cm);

lcd.setCursor(14, 0);

lcd.print("cm");

lcd.setCursor(1, 0);

lcd.print("== Be Careful ==");

tone(speaker, hiSound, 300);


tone(speaker, lowSound, 300);

if (cm <= 30) {

digitalWrite(pinGreen, LOW);

mod4();

lcd.setCursor(0, 0);

lcd.print("Jarak: ");

lcd.setCursor(9, 0);

lcd.print(cm);

lcd.setCursor(14, 0);

lcd.print("cm");

lcd.setCursor(1, 0);

lcd.print("== To Close ==");

tone(speaker, hiSound, 400);

tone(speaker, lowSound, 400);

if (cm <= 20) {

digitalWrite(pinGreen, LOW);

mod5();

lcd.setCursor(0, 0);

lcd.print("Jarak: ");

lcd.setCursor(9, 0);

lcd.print(cm);

lcd.setCursor(14, 0);

lcd.print("cm");
lcd.setCursor(1, 0);

lcd.print("== Almost ==");

tone(speaker, hiSound, 500);

tone(speaker, lowSound, 500);

if (cm <= 15) {

lcd.setCursor(0,0);

lcd.print("Jarak: ");

lcd.setCursor(9,0);

lcd.print(cm);

lcd.setCursor(14,0);

lcd.print("cm");

lcd.setCursor(1,0);

lcd.print("== Stop ==");

digitalWrite(pinGreen, HIGH);

void mod1() {

digitalWrite(pinRed, HIGH);

delay(100);

digitalWrite(pinRed, LOW);

delay(100);

void mod2() {
digitalWrite(pinRed, HIGH);

delay(80);

digitalWrite(pinRed, LOW);

delay(80);

void mod3() {

digitalWrite(pinRed, HIGH);

delay(60);

digitalWrite(pinRed, LOW);

delay(60);

void mod4() {

digitalWrite(pinRed, HIGH);

delay(40);

digitalWrite(pinRed, LOW);

delay(40);

void mod5() {

digitalWrite(pinRed, HIGH);

delay(20);

digitalWrite(pinRed, LOW);

delay(20);

Foto Alat & Pembuat :


Nama-nama Anggota kelompok : 1. Jamariel Gunadidantons

2. Salsabila Firdausia Nuryadin

3. Siti Sarah Sri Mitri

Logo :

QR Code Video :

You might also like