RANCANG BANGUN PENGENDALI MOTOR SERVO DAN PENENTU KOORDINAT PADA PETAK PERMAINAN CATUR (SOFTWARE) TUGAS AKHIR
Disusun Oleh :
Choyin Setyo Bagus 201110130311069
JURUSAN ELEKTRO FAKULTAS TEKNIK UNIVERSITAS MUHAMMADIYAH MALANG TAHUN 2016
DAFTAR ISI
LEMBAR JUDUL ..............................................................................................i LEMBAR PERSETUJUAN................................................................................ii LEMBAR PENGESAHAN ................................................................................iii LEMBAR PERNYATAAN .................................................................................iv ABSTRAK ..........................................................................................................v ABSTRACT ........................................................................................................vi LEMBAR PERSEMBAHAN .............................................................................vii KATA PENGANTAR ..........................................................................................viii DAFTAR ISI .......................................................................................................ix DAFTAR GAMBAR ..........................................................................................xii DAFTAR TABEL................................................................................................xvii
BAB I PENDAHULUAN 1.1
Latar Belakang ...........................................................................................1
1.2
Rumusan Masalah ....................................................................................2
1.3
Tujuan ........................................................................................................2
1.4
Batasan Masalah ........................................................................................2
1.5
Metodologi ...............................................................................................3
1.6
Sistematika Penulisan ..............................................................................3
BAB II DASAR TEORI 2.1
Bahasa Pemrogaman ..................................................................................6 2.1.1 Java.................................................................................................6 2.1.2 Bahasa C .........................................................................................8 2.1.3 C++.................................................................................................9 2.1.4 PHP.................................................................................................10 2.1.5 Visual Basic ....................................................................................12
2.1.6 Borland Delphi ...........................................................................................13 2.2
Komunikasi Serial ...................................................................................15 2.2.1 Komunikasi Serial PHP..................................................................16 2.2.2 Komunikasi Serial Delphi ..............................................................17 2.2.3 Komunikasi Serial Visual Basic .....................................................18
BAB III PERENCANAAN DAN PEMBUATAN SISTEM 3.1
Perencanaan Software ................................................................................22 3.1.1 Lingkungan Kerja Delphi (IDE).......................................................22 3.1.1.1 Main Windoe .......................................................................22 3.1.1.2 Component Palette ..............................................................23 3.1.1.3 Object Inspector ..................................................................23 3.1.1.4 Code Editor .........................................................................24 3.1.1.5 Object TreeView ..................................................................25 3.1.1.6 Form Designer ....................................................................25
3.2
Pembuatan Software ................................................................................26 3.2.1 Perencanaan Petak Papan Catur .......................................................26 3.2.2 Perencanaan Bidak Papan Catur ......................................................28 3.2.3 Perencanaan Tampilan Koordinat Bidak dan Petak Catur .....29
BAB IV PENGUJIAN DAN ANALISA 4.1. Pengujian Program Pada Delphi ..............................................................33 4.1.1 Pengujian Saat Bidak Berpindah ........................................................33 4.1.2 Pengujian Bidak Saat Menempati Bidak Lain ...................................46 4.2. Pengujian Komunikasi Serial antara Delphi 7 dengan Arduino Mega ....61 4.2.1 Pengujian Saat Bidak Berpindah ........................................................62
4.2.2 Pengujian Saat Bidak Menempati Bidak Lain ...................................65
BAB V PENUTUP 5.1 Kesimpulan.............................................................................................69 5.2 Saran.......................................................................................................69
DAFTAR PUSTAKA LAMPIRAN
DAFTAR GAMBAR
Gambar 3.1 Diagram Blok Perencanaan Pemrogaman .......................................21 Gambar 3.2 Main Window...................................................................................23 Gambar 3.3 Component Palette ..........................................................................23 Gambar 3.4 Object Inspector ..............................................................................24 Gambar 3.5 Code Editor .....................................................................................24 Gambar 3.6 Object TreeView...............................................................................24 Gambar 3.7 Form Designer ................................................................................25 Gambar 3.8 Form 1 Petak Papan Catur ..............................................................26 Gambar 3.9 Object Inspector Proprerties Petan Papan Catur ............................27 Gambar 3.10 Object Inspector Event Petak Papan Catur ...................................27 Gambar 3.11 Tampilan Bidak Hitam ..................................................................28 Gambar 3.12 Tampilan Bidak Putih ....................................................................29 Gambar 3.13 Tampilan Koordinat Bidak Catur ..................................................30 Gambar 3.14 Tampilan Posisi Bidak Catur saat berpindah .................................31 Gambar 3.15 Tampilan Posisi Bidak Catur Saat menempati Posisi Bidak Lain .31 Gambar 4.1 Tampilan Awal Permainan Catur .....................................................32 Gambar 4.2 Awal Pion Hitam Sebelum Dipindahkan .........................................33 Gambar 4.3 Tampilan Koordinat Pion Hitam A2 ................................................33 Gambar 4.4 Pion Hitam Berpindah Tempat ........................................................34 Gambar 4.5 Tampilan Koordinat Pion Hitam Saat Sudah Dipindahkan .............33 Gambar 4.6 Tampilan Perpindahan Pion Hitam..................................................34 Gambar 4.7 Awal Kuda Hitam Sebelum Dipindahkan .......................................35
Gambar 4.8 Tampilan Koordinat Kuda Hitam B1 ..............................................35 Gambar 4.9 Kuda Hitam Berpindah Tempat .......................................................35 Gambar 4.10 Tampilan Koordinat Kuda Hitam Saat Sudah Dipindahkan .........35 Gambar 4.11 Tampilan Perpindahan Bidak ........................................................36 Gambar 4.12 Awal Menteri Hitam Sebelum Dipindahkan .................................36 Gambar 4.13 Tampilan Koordinat Menteri Hitam C1 ........................................36 Gambar 4.14 Menteri Hitam Berpindah Tempat .................................................37 Gambar 4.15 Tampilan Koordinat menteri Hitam saat Sudah Dipindahkan.......37 Gambar 4.16 Tampilan Perpindahan Bidak ........................................................37 Gambar 4.17 Awal Ratu Hitam Sebelum Dipindahkan.......................................37 Gambar 4.18 Tampilan Koordinat
Ratu Hitam D1 ..........................................38
Gambar 4.19 Ratu Hitam Berpindah Tempat ......................................................38 Gambar 4.20 Tampilan Koordinat Ratu Hitam Saat Sudah dipindahkan ...........38 Gambar 4.21 Tampilan Perpindahan Bidak ........................................................38 Gambar 4.22 Awal Benteng Hitam Sebelum Dipindahkan .................................39 Gambar 4.23 Tampilan koordinat Benteng Hitam A1.........................................39 Gambar 4.24 Benteng HitamBerpindah Tempat .................................................39 Gambar 4.25 Tampilan Koordinat Benteng Hitam Saat Sudah Dipindahkan .....39 Gambar 4.26 Tampilan Perpindahan Benteng Hitam..........................................39 Gambar 4.27 Awal Pion Putih Sebelum Dipindahkan ........................................40 Gambar 4.28 Tampilan Koordinat Pion Putih G7 ...............................................40 Gambar 4.29 Pion Putih Sudah Berpindah Tempat.............................................40 Gambar 4.30 Tampilan Koordinat Pion Putih Saat Sudah Dipindahkan ............41
Gambar 4.31 Tampilan Perpindahan Bidak ........................................................41 Gambar 4.32 Awal Kuda Putih Sebelum Dipindahkan .......................................41 Gambar 4.33 Tampilan koordinat Kuda Putih B7 ...............................................41 Gambar 4.34 Kuda Putih Berpindah Tempat ......................................................42 Gambar 4.35 Tampilan Koordinat Kuda Putih Saat Sudah Dipindahkan ...........42 Gambar 4.36 Tampilan Perpindahan Bidak ........................................................42 Gambar 4.37 Awal Benteng Putih Sebelum Dipindahkan ..................................42 Gambar 4.38 Tampilan koordinat Benteng Putih A6 ..........................................43 Gambar 4.39 Benteng Putih Berpindah Tempat..................................................43 Gambar 4.40 Tampilan Koordinat Benteng Putih Saat Sudah Dipindahkan ......43 Gambar 4.41 Tampilan Perpindahan Bidak ........................................................43 Gambar 4.42 Awal Menteri Putih Sebelum Dipindahkan ...................................44 Gambar 4.43 Tampilan koordinat Menteri Putih F8 ...........................................44 Gambar 4.44 Menteri Putih Berpindah Tempat ..................................................44 Gambar 4.45 Tampilan Koordinat Menteri Putih Saat Sudah Dipindahkan .......45 Gambar 4.46 Tampilan Perpindahan Bidak ........................................................45 Gambar 4.47 Awal Raja Putih Sebelum Dipindahkan ........................................45 Gambar 4.48 Tampilan koordinat Raja Putih E8 ................................................45 Gambar 4.49 Raja Putih Berpindah Tempat........................................................46 Gambar 4.50 Tampilan Koordinat Raja Putih Saat Sudah Dipindahkan ............46 Gambar 4.51 Tampilan Perpindahan Bidak ........................................................46 Gambar 4.52 Posisi Awal Pion Hitam dan Pion Putih ........................................47 Gambar 4.53 Posisi Pion Hitam Menempati Tempat Pion Putih ........................47
Gambar 4.54 Posisi Akhir Pion Putih .................................................................48 Gambar 4.55 Tampilan Perpindahan Bidak ........................................................48 Gambar 4.56 Posisi Awal Ratu Hitam dan Pion Putih ........................................48 Gambar 4.57 Posisi Ratu HitamMenempati Tempat Pion Putih .........................49 Gambar 4.58 Posisi akhir Pion Putih ..................................................................49 Gambar 4.59 Tampilan Perpindahan Bidak ........................................................49 Gambar 4.60 Posisi Awal Pion Putih Dan Ratu Hitam .......................................50 Gambar 4.61 Posisi Pion Putih menempati Tempat Ratu Hitam ........................50 Gambar 4.62 Posisi Akhir Ratu Hitam................................................................51 Gambar 4.63 Tampilan Perpindahan Bidak ........................................................51 Gambar 4.64 Posisi Awal Kuda Putih Dan Pion Hitam ......................................51 Gambar 4.65 Posisi Kuda Putih Menempati Tempat Pion Hitam .......................52 Gambar 4.66 Posisi Akhir Pion Hitam ................................................................52 Gambar 4.67 Tampilan Perpindahan Bidak ........................................................53 Gambar 4.68 Posisi Awal Benteng Hitam dan Ratu Putih ..................................53 Gambar 4.69 Posisi Benteng Hitam Menempati Tempat Ratu Putih ..................53 Gambar 4.70 Posisi Akhir Ratu Putih .................................................................54 Gambar 4.71 Tampilan Perpindahan Bidak ........................................................54 Gambar 4.72 Posisi Awal Raja Putih Dan Menteri Hitam ..................................54 Gambar 4.73 Posisi Raja Putih Menempati Tempat Menteri Hitam ...................55 Gambar 4.74 Posisi Akhir Menteri Hitam ..........................................................55 Gambar 4.75 Tampilan Perpindahan Bidak ........................................................55 Gambar 4.76 Posisi Awal Kuda Hitam Dan Menteri Putih .................................56
Gambar 4.77 Posisi Kuda Hitam Menempati Tempat Menteri Putih .................56 Gambar 4.78 Posisi Akhir Menteri Putih ............................................................57 Gambar 4.79 Tampilan Perpindahan Bidak ........................................................57 Gambar 4.80 Posisi Awal Benteng Putih Dan Menteri Hitam ............................57 Gambar 4.81 Posisi Benteng Putih Menempati Tempat Menteri Hitam .............58 Gambar 4.82 Posisi Akhir Menteri Hitam ..........................................................58 Gambar 4.83 Tampilan Perpindahan Bidak ........................................................58 Gambar 4.84 Posisi Awal Benteng Hitam Dan Benteng Putih ...........................59 Gambar 4.85 Posisi Benteng Hitam Menempati Tempat Benteng Putih ............59 Gambar 4.86 Posisi Akhir Benteng Putih ...........................................................60 Gambar 4.87 Tampilan Perpindahan Bidak ........................................................60 Gambar 4.88 Posisi Awal Ratu Putih Dan Kuda Hitam ......................................60 Gambar 4.89 Posisi Ratu Putih Menempati Tempat Kuda Hitam.......................61 Gambar 4.90 Posisi Akhir Kuda Hitam ..............................................................61 Gambar 4.91 Tampilan Perpindahan Bidak ........................................................61
DAFTAR TABEL Tabel 4.1 Delphi Memberikan Perintah ke Arduino ...........................................62 Tabel 4.2 Arduino Memberikan Perintah ke Delphi ...........................................63 Tabel 4.3 Delphi Memberikan Perintah ke Arduino .........................................65 Tabel 4.4 Arduino Memberikan Perintah ke Delphi ...........................................66
Daftar Pustaka
[1]. Andi Kurniawan, Syahru., 2012 .Sistem Penjejak Posisi Obyek Berbasis Umpan Balik Citra, Jurusan Teknik Komputer Fakultas Teknik dan Ilmu Komputer Universitas Komputer Indonesia. [2]. Isa Rachman, Lilik Subiyanto, Gaguk Suhardjito, Arie Indartono., 2014 IdentifikasiGaris Stabilitas Melintang Kapal Melalui Percobaan Kemiringan Menggunakan Delphi Berbasis Arduino, Jurusan Teknik Kelistrikan Kapal, Politeknik Perkapalan Negeri Surabaya. [3]. M Agus J. Alam., 2003. Mengolah Database dengan Borland Delphi 7. Penerbit PT Elex Media Komputindo Kelompok Gramedia. [4]. Anonim., 2003. Seri Panduan Pemrogaman: Pemrogaman Borland Delphi 7. Jilid 2. Yogyakarta, Penerbit ANDI. [5]. Anonim., 2003. Panduan Praktis Pemrogaman Borland Delphi 7.0. Yogyakarta, Penerbit Andi. [6]. Nugroho Adi., 2008. Pemrogaman Java Menggunakan IDE Eclipse Callisa dalam Penerapannya pada Pengembangan Aplikasi Mandiri (Stand Alone) dan Aplikasi Berbasis web. Yogyakarta, Penerbit ANDI [7]. Mackenzie Duncan, Sharkey Kent., 2002. SAMS Teach Yourself Visual Basic .Net in 21 Days, Yogyakarta, Penerbit ANDI. [8]. Anonim., 2004. Tutorial Membuat Program Dengan Visual Basic. Jakarta, Salemba Infotek. [9]. Supriyanto Dodit., 2008. Dasar Pemrogaman PHP, Bandung, Penerbit OASE Media. [10]. Utama Ema, Sukrisno., 2005. 10 Langkah Belajar Logika dan Algoritma Menggunakan Bahasa C dan C++ di GNU/Linux, Yogyakarta, Penerbit ANDI OFFSET. [11]. http://www.msdn.microsoft.com/en-us/library/2x7hihfk.aspx (diakses tanggal 17 September 2015)