SANCHEN ID
From Think to Things.

Wujudkan ide imajinasimu menjadi inovasi nyata. Fasilitas lengkap untuk research IoT, Robotika, dan Sistem Kendali Cerdas.

Tentang Kami

Hardware & Software
Bersatu.

Seperti Arduino yang menghubungkan kode dengan dunia nyata, Sanchen ID menjembatani teori dengan pengaplikasian industri. Kami menyediakan jasa bagi tiap inovasi menjadi kenyataan.

Pelajari Selengkapnya
Sanchen Indonesia

Sanchen ID
Dimulai Dari Sini.

kami berkembang bersama anda, raih kemudahan riset penelitian dan tugas dengan kami.

50+

Modul IoT

All you want

Project

Expert

Tim

Terbaik

Kualitas

Kit edukatif untuk mengenal elektronik dengan cara yang menyenangkan dan langsung praktik

KIT - DIY

Jelajahi Sekarang
Slider Image

Pilih Paket Joki Proyek

Geser untuk menemukan paket yang pas dengan budget & tingkat kesulitanmu.

πŸ’»

1. Coding Only

Programnya doang, alat rakit sendiri.

150rb
  • βœ” File .ino/.cpp dikirim
  • βœ” Penjelasan Logic
  • βœ” Revisi Koding 2x
Pilih Ini
πŸ’‘

2. Arduino Basic

Tugas kuliah dasar (Lampu/Jarak).

350rb
  • βœ” Arduino Uno/Nano
  • βœ” 1-2 Sensor Simpel
  • βœ” Wiring Diagram
Pilih Ini
FAVORIT MABA

3. Paket Hemat

Monitoring offline + LCD Display.

500rb
  • βœ” 3 Sensor + LCD
  • βœ” Output Buzzer/Relay
  • βœ” Video Demo Alat
Pilih Ini

4. IoT Starter

Mulai online pakai HP (Blynk/Telegram).

600rb
  • βœ” NodeMCU ESP8266
  • βœ” Kontrol Jarak Jauh
  • βœ” Notif WA/Telegram
Pilih Ini

5. Skripsi IoT Aman

Standar lulus sidang. Fitur lengkap & stabil.

750rb
  • ESP32 Dual Core
  • Web Server / Dashboard
  • Source Code Rapi
  • Garansi Konsultasi
Pesan Sekarang

6. IoT + Android App

Aplikasi .apk dengan logo sendiri.

1 Jt
  • βœ” Custom App (Flutter)
  • βœ” Database Firebase
  • βœ” UI/UX Modern
Pilih Ini

7. Web Monitoring

Website pro, database MySQL & Grafik.

1.5 Jt
  • βœ” Web PHP/Laravel
  • βœ” Export Data Excel/PDF
  • βœ” Grafik Realtime
Pilih Ini

8. AI & Camera

Image Processing, ESP32-CAM, Python.

2.5 Jt
  • βœ” Deteksi Objek/Wajah
  • βœ” Integrasi Python
  • βœ” Hardware High-End
Pilih Ini

9. Paket Sultan

Terima beres, PCB Cetak & Casing 3D.

4 Jt++
  • βœ” PCB Industrial
  • βœ” Casing 3D Halus
  • βœ” Full Laporan & Video
Konsultasi VIP
Geser ke samping →

Kemahalan...?
Nego dulu aja!

Tenang, kami bantuin cari solusi sampai deal.

  • Sesuaikan fitur alat dengan isi dompetmu
  • Bisa cicil pembayaran (DP Ringan dulu)
  • Konsultasi gratis 24/7 via WhatsApp

Mulai dari Rp0 (Konsultasi) + Bonus Revisi

admin kami akan membalas anda secepatnya!!
Mahasiswa Happy

Diskon Mahasiswa

20%

User User User

Trusted by

500+ Mahasiswa

⚑ Flash Sale Services

Promo & Jasa Kilat

Solusi hemat budget untuk kebutuhan spesifik kamu. Geser untuk melihat opsi lainnya.

Geser Kartu

Joki Tugas Elektro

Bantu kerjain tugas kuliah, praktikum, jurnal, sampai Tugas Besar dengan simulasi Proteus.

Mulai Dari 100rb

Bikin Website Kilat

Jasa pembuatan Landing Page, Web Portofolio, atau Tugas Web Programming (PHP/HTML).

Mulai Dari 200rb

Sanchen Mengajar

Privat mentoring belajar Arduino, IoT, dan Soldering dari nol sampai mahir via Google Meet.

Harga Teman 25rb/jam

Committed to Quality and Sustainable Innovation

Driving Innovation, Delivering Excellence

Kami Semakin Dekat

Kami hadir mewujudkan imajinasi anda sesuai dengan kebutuhan yang anda inginkan dengan mudah.

Visi

Menjadi pusat inovasi elektro terkemuka yang menjembatani riset teknologi mutakhir dengan kebutuhan industri nyata demi kemajuan masa depan digital Indonesia.

Misi

"Mentransformasi masa depan melalui riset unggulan di bidang otomatisasi robotik, konektivitas IoT, dan optimalisasi daya listrik."

Powerful APIs

Riset dan inovasi adalah dua pilar yang saling melengkapi; riset adalah proses mengubah sumber daya menjadi pengetahuan, sementara inovasi adalah proses mengubah pengetahuan menjadi nilai dan manfaat nyata.

NotificationSetting.desk
App.desk
"Riset adalah cara kita bertanya kepada masa depan, dan inovasi adalah jawaban yang kita bangun untuk menjawabnya."

Powered By Technology

ARDUINORASPBERRY PIPYTHONC++ALTIUMMATLABESP32LORA WAN ARDUINORASPBERRY PIPYTHONC++ALTIUMMATLABESP32LORA WAN

Dapur Riset Inovasi

Memantau perkembangan teknologi terbaru yang sedang digodok oleh tim R&D kami secara real-time.

Belum ada data riset yang dipublikasikan.

Katalog Produk & Layanan

Stok: 1
Proyek IOT

Alat Pemantau Cuaca (Suhu, Kelembapan, Tekanan udara, Kadar Polusi udara, kecepatan angin, Curah Huj

Stok: 1
Proyek IOT

Alat Pantau Cuaca realtime dengan telegram

Stok: 10
Tools

Pelatihan Dasar Desain PCB dengan Autodesk Eagle

Stok: 2
Tools

Emergency Smart Powerbank IOT

Stok: 2
trainner

Trainner Praktikum Teknik Digital-Logic Gate

Stok: 2
trainner

Trainner Praktikum Elektronika Analog-OpAmp

Stok: 2
trainner

Trainner Kendali dan Kontrol Motor

Stok: 20
Sensor

Cetak PCB Singgle Layer

Stok: 2
Tools

Alat Monitoring Kecepatan Angin

Stok: 2
Mikrokontroler

Wheather System IOT PLTS

Blog dan Artikel

πŸ“… 29 Dec 2025 RND ADMIN

Arduino Tetris by Sanchen ID

Membuat Game Tetris Sederhana Menggunakan Arduino Nano Pendahuluan Arduino Nano merupakan salah satu papan mikrokontroler yang banyak digunakan dalam proyek elektronika dan pembelajaran pemrograman karena ukurannya yang kecil, harga terjangkau, serta kemampuannya yang cukup mumpuni. Salah satu proyek menarik yang dapat dikembangkan menggunakan Arduino Nano adalah pembuatan game Tetris sederhana. Game Tetris dipilih karena memiliki konsep logika yang jelas, melatih pemahaman pemrograman, serta dapat dikombinasikan dengan komponen hardware seperti layar LED, LCD, atau OLED. Proyek ini sangat cocok untuk pelajar, mahasiswa, maupun pemula yang ingin belajar pemrograman Arduino dengan cara yang menyenangkan. Konsep Game Tetris pada Arduino Tetris adalah permainan menyusun balok dengan berbagai bentuk (tetromino) yang jatuh dari atas layar. Pemain harus memutar dan menggeser balok agar tersusun rapi. Jika satu baris penuh, baris tersebut akan menghilang dan skor bertambah. Dalam versi Arduino Nano, konsep ini disederhanakan agar sesuai dengan keterbatasan memori dan kecepatan mikrokontroler. Tampilan game biasanya ditampilkan menggunakan: LED Matrix LCD 16x2 OLED Display Kontrol permainan dapat menggunakan beberapa tombol seperti tombol kiri, kanan, rotasi, dan jatuh cepat. Cara Kerja Program Arduino Tetris Program Arduino Tetris bekerja dengan beberapa tahapan utama: Inisialisasi Sistem Pada awal program, Arduino akan menginisialisasi layar, tombol input, serta variabel penting seperti skor dan posisi balok. Pembentukan Balok (Tetromino) Setiap balok direpresentasikan dalam bentuk array atau matriks kecil. Arduino akan memilih balok secara acak dan menampilkannya di bagian atas layar. Pergerakan Balok Balok akan bergerak turun secara otomatis berdasarkan waktu (delay). Tombol input memungkinkan pemain menggeser atau memutar balok. Deteksi Tabrakan Program akan memeriksa apakah balok menyentuh bagian bawah layar atau balok lain. Jika iya, balok akan dikunci di posisi tersebut. Penghapusan Baris Jika satu baris terisi penuh, baris tersebut akan dihapus dan skor pemain bertambah. Game Over Permainan akan berakhir jika balok tidak dapat lagi ditempatkan di area permainan. Manfaat Mempelajari Proyek Ini Membuat game Tetris menggunakan Arduino Nano memberikan banyak manfaat, antara lain: Melatih logika pemrograman dan algoritma Memahami penggunaan array dan kondisi (if-else) Belajar mengelola input dan output perangkat keras Mengembangkan kreativitas dalam proyek mikrokontroler Proyek ini juga dapat dikembangkan lebih lanjut, seperti menambahkan suara buzzer, sistem level, atau penyimpanan skor tertinggi. program nya #include #include #include #define WIDTH 64 // OLED display width, in pixels #define HEIGHT 128 // OLED display height, in pixels Adafruit_SSD1306 display(128, 64, &Wire, -1); static const unsigned char PROGMEM mantex_logo [] = { 0x00, 0x00, 0x18, 0x06, 0x01, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3c, 0x0f, 0x03, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x78, 0x7f, 0xff, 0xff, 0xe1, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0xff, 0xf8, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0xff, 0xfc, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf1, 0xff, 0x0f, 0xff, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xfc, 0x01, 0xff, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xf0, 0x00, 0xff, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf1, 0xf0, 0x00, 0x7f, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf1, 0xe0, 0x70, 0x3f, 0xfc, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xe1, 0xf8, 0x3f, 0xfc, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xe1, 0xff, 0xff, 0xfc, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xe1, 0xff, 0xff, 0xfc, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xc1, 0xff, 0xff, 0xfc, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xe1, 0xe0, 0x07, 0xfc, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf1, 0xe1, 0xe0, 0x01, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xe1, 0xe0, 0x00, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xe0, 0xe3, 0xf8, 0x7c, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf1, 0xe0, 0x63, 0xfc, 0x7c, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf1, 0xf0, 0x23, 0xfc, 0x3c, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xf8, 0x23, 0xfc, 0x3c, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xff, 0x63, 0xfc, 0x3c, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xe3, 0xfc, 0x3c, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xe3, 0xfc, 0x7c, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xe3, 0xf8, 0x7c, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf1, 0xff, 0xe1, 0xf0, 0x7c, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xe0, 0x00, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xe0, 0x03, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xe0, 0x1f, 0xfc, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xf1, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0xff, 0xf8, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xf8, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x78, 0x7f, 0xff, 0xff, 0xf0, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x7c, 0x1f, 0xff, 0xff, 0xc1, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x1f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3e, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3c, 0x0f, 0x83, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3c, 0x0f, 0x01, 0xc0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; const char pieces_S_l[2][2][4] = {{ {0, 0, 1, 1}, {0, 1, 1, 2} }, { {0, 1, 1, 2}, {1, 1, 0, 0} }}; const char pieces_S_r[2][2][4]{{ {1, 1, 0, 0}, {0, 1, 1, 2} }, { {0, 1, 1, 2}, {0, 0, 1, 1} }}; const char pieces_L_l[4][2][4] = {{ {0, 0, 0, 1}, {0, 1, 2, 2} }, { {0, 1, 2, 2}, {1, 1, 1, 0} }, { {0, 1, 1, 1}, {0, 0, 1, 2} }, { {0, 0, 1, 2}, {1, 0, 0, 0} }}; const char pieces_Sq[1][2][4] = {{ {0, 1, 0, 1}, {0, 0, 1, 1} }}; const char pieces_T[4][2][4] = {{ {0, 0, 1, 0},{0, 1, 1, 2} }, { {0, 1, 1, 2},{1, 0, 1, 1} }, { {1, 0, 1, 1},{0, 1, 1, 2} }, { {0, 1, 1, 2},{0, 0, 1, 0} }}; const char pieces_l[2][2][4] = {{ {0, 1, 2, 3}, {0, 0, 0, 0} }, { {0, 0, 0, 0}, {0, 1, 2, 3} }}; const short MARGIN_TOP = 19; const short MARGIN_LEFT = 3; const short SIZE = 5; const short TYPES = 6; #define SPEAKER_PIN 2 const int MELODY_LENGTH = 10; const int MELODY_NOTES[MELODY_LENGTH] = {262, 294, 330, 262}; const int MELODY_DURATIONS[MELODY_LENGTH] = {500, 500, 500, 500}; int click[] = { 1047 }; int click_duration[] = { 100 }; int erase[] = { 2093 }; int erase_duration[] = { 100 }; word currentType, nextType, rotation; short pieceX, pieceY; short piece[2][4]; int interval = 20, score; long timer, delayer; boolean grid[10][18]; boolean b1, b2, b3; int left=11; int right=9; int change=12; int speed=10; void checkLines(){ boolean full; for(short y = 17; y >= 0; y--){ full = true; for(short x = 0; x < 10; x++){ full = full && grid[x][y]; } if(full){ breakLine(y); y++; } } } void breakLine(short line){ tone(SPEAKER_PIN, erase[0], 1000 / erase_duration[0]); delay(100); noTone(SPEAKER_PIN); for(short y = line; y >= 0; y--){ for(short x = 0; x < 10; x++){ grid[x][y] = grid[x][y-1]; } } for(short x = 0; x < 10; x++){ grid[x][0] = 0; } display.invertDisplay(true); delay(50); display.invertDisplay(false); score += 10; } void refresh(){ display.clearDisplay(); drawLayout(); drawGrid(); drawPiece(currentType, 0, pieceX, pieceY); display.display(); } void drawGrid(){ for(short x = 0; x < 10; x++) for(short y = 0; y < 18; y++) if(grid[x][y]) display.fillRect(MARGIN_LEFT + (SIZE + 1)*x, MARGIN_TOP + (SIZE + 1)*y, SIZE, SIZE, WHITE); } boolean nextHorizontalCollision(short piece[2][4], int amount){ for(short i = 0; i < 4; i++){ short newX = pieceX + piece[0][i] + amount; if(newX > 9 || newX < 0 || grid[newX][pieceY + piece[1][i]]) return true; } return false; } boolean nextCollision(){ for(short i = 0; i < 4; i++){ short y = pieceY + piece[1][i] + 1; short x = pieceX + piece[0][i]; if(y > 17 || grid[x][y]) return true; } return false; } void generate(){ currentType = nextType; nextType = random(TYPES); if(currentType != 5) pieceX = random(9); else pieceX = random(7); pieceY = 0; rotation = 0; copyPiece(piece, currentType, rotation); } void drawPiece(short type, short rotation, short x, short y){ for(short i = 0; i < 4; i++) display.fillRect(MARGIN_LEFT + (SIZE + 1)*(x + piece[0][i]), MARGIN_TOP + (SIZE + 1)*(y + piece[1][i]), SIZE, SIZE, WHITE); } void drawNextPiece(){ short nPiece[2][4]; copyPiece(nPiece, nextType, 0); for(short i = 0; i < 4; i++) display.fillRect(50 + 3*nPiece[0][i], 4 + 3*nPiece[1][i], 2, 2, WHITE); } void copyPiece(short piece[2][4], short type, short rotation){ switch(type){ case 0: //L_l for(short i = 0; i < 4; i++){ piece[0][i] = pieces_L_l[rotation][0][i]; piece[1][i] = pieces_L_l[rotation][1][i]; } break; case 1: //S_l for(short i = 0; i < 4; i++){ piece[0][i] = pieces_S_l[rotation][0][i]; piece[1][i] = pieces_S_l[rotation][1][i]; } break; case 2: //S_r for(short i = 0; i < 4; i++){ piece[0][i] = pieces_S_r[rotation][0][i]; piece[1][i] = pieces_S_r[rotation][1][i]; } break; case 3: //Sq for(short i = 0; i < 4; i++){ piece[0][i] = pieces_Sq[0][0][i]; piece[1][i] = pieces_Sq[0][1][i]; } break; case 4: //T for(short i = 0; i < 4; i++){ piece[0][i] = pieces_T[rotation][0][i]; piece[1][i] = pieces_T[rotation][1][i]; } break; case 5: //l for(short i = 0; i < 4; i++){ piece[0][i] = pieces_l[rotation][0][i]; piece[1][i] = pieces_l[rotation][1][i]; } break; } } short getMaxRotation(short type){ if(type == 1 || type == 2 || type == 5) return 2; else if(type == 0 || type == 4) return 4; else if(type == 3) return 1; else return 0; } boolean canRotate(short rotation){ short piece[2][4]; copyPiece(piece, currentType, rotation); return !nextHorizontalCollision(piece, 0); } void drawLayout(){ display.drawLine(0, 18, WIDTH, 18, WHITE); display.drawRect(0, 0, WIDTH, HEIGHT, WHITE); drawNextPiece(); char text[6]; itoa(score, text, 10); drawText(text, getNumberLength(score), 7, 4); } short getNumberLength(int n){ short counter = 1; while(n >= 10){ n /= 10; counter++; } return counter; } void drawText(char text[], short length, int x, int y){ display.setTextSize(1); // Normal 1:1 pixel scale display.setTextColor(WHITE); // Draw white text display.setCursor(x, y); // Start at top-left corner display.cp437(true); // Use full 256 char 'Code Page 437' font for(short i = 0; i < length; i++) display.write(text[i]); } void bruh() { pinMode(left, INPUT_PULLUP); pinMode(right, INPUT_PULLUP); pinMode(change, INPUT_PULLUP); pinMode(speed, INPUT_PULLUP); pinMode(SPEAKER_PIN, OUTPUT); Serial.begin(9600); // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64 Serial.println(F("SSD1306 allocation failed")); for(;;); // Don't proceed, loop forever } display.setRotation(1); display.clearDisplay(); display.drawBitmap(0, 0, mantex_logo, 64, 128, WHITE); display.display(); delay(2000); display.clearDisplay(); drawLayout(); display.display(); randomSeed(analogRead(0)); nextType = random(TYPES); generate(); timer = millis(); } boolean checkGameOver() { for(short x = 0; x < 10; x++){ if(grid[x][0]) return true; } return false; } void setup() { bruh(); } void loop() { if(millis() - timer > interval){ checkLines(); refresh(); if(nextCollision()){ for(short i = 0; i < 4; i++) grid[pieceX + piece[0][i]][pieceY + piece[1][i]] = 1; generate(); }else pieceY++; if(checkGameOver()){ // Game over condition met // Stop updating game state while(1) { // display.clearDisplay(); // drawLayout(); // display.display(); display.setCursor(6, 11); // Start at middle of the screen display.println(F("Game Over")); display.display(); // Show initial text } return; } timer = millis(); } if(!digitalRead(left)){ tone(SPEAKER_PIN, click[0], 1000 / click_duration[0]); delay(100); noTone(SPEAKER_PIN); if(b1){ if(!nextHorizontalCollision(piece, -1)){ pieceX--; refresh(); } b1 = false; } }else{ b1 = true; } if(!digitalRead(right)){ tone(SPEAKER_PIN, click[0], 1000 / click_duration[0]); delay(100); noTone(SPEAKER_PIN); if(b2){ if(!nextHorizontalCollision(piece, 1)){ pieceX++; refresh(); } b2 = false; } }else{ b2 = true; } if(!digitalRead(speed)){ interval = 20; }else{ interval = 400; } if(!digitalRead(change)){ tone(SPEAKER_PIN, click[0], 1000 / click_duration[0]); delay(100); noTone(SPEAKER_PIN); if(b3){ if(rotation == getMaxRotation(currentType) - 1 && canRotate(0)){ rotation = 0; }else if(canRotate(rotation + 1)){ rotation++; } copyPiece(piece, currentType, rotation); refresh(); b3 = false; delayer = millis(); } } else if(millis() - delayer > 50){ b3 = true; } }

Baca Selengkapnya
πŸ“… 23 Dec 2025 ibnu

Mengubah Masa Depan Melalui Inovasi dan Riset: Fondasi Kemajuan Teknologi

Di era disrupsi digital yang bergerak begitu cepat, dua kata sering kali menjadi penentu apakah sebuah organisasi akan bertahan atau tertinggal: Riset dan Inovasi. Meskipun sering digunakan secara bergantian, keduanya memiliki peran yang berbeda namun saling melengkapi dalam menciptakan perubahan besar di dunia teknologi, khususnya di bidang sistem kelistrikan. Apa Itu Riset dan Inovasi? Secara mendasar, Riset adalah proses pencarian pengetahuan baru melalui penyelidikan sistematis. Ini adalah fase di mana kita mengubah investasi (waktu dan biaya) menjadi pengetahuan. Sementara itu, Inovasi adalah penerapan dari pengetahuan tersebut untuk menciptakan nilai baru—baik berupa produk yang lebih efisien, layanan yang lebih cepat, maupun sistem yang lebih aman. "Riset adalah mengubah uang menjadi pengetahuan; Inovasi adalah mengubah pengetahuan kembali menjadi uang (nilai)." Mengapa Keduanya Sangat Penting? Memecahkan Masalah Kompleks Dunia menghadapi tantangan besar seperti krisis energi dan perlunya efisiensi daya. Tanpa riset mendalam terhadap material baru atau algoritma sistem kontrol, inovasi seperti Smart Grid atau Renewable Energy Integration tidak akan pernah terwujud. Keunggulan Kompetitif Perusahaan yang mendedikasikan sumber dayanya untuk divisi RnD (Research and Development) cenderung lebih unggul karena mereka tidak hanya mengikuti tren, tetapi menciptakan tren tersebut. Efisiensi dan Keamanan Dalam bidang Electrical System, riset memastikan bahwa setiap inovasi yang diluncurkan telah melalui tahap pengujian ketat. Hal ini meminimalkan risiko kegagalan sistem dan meningkatkan efisiensi operasional secara keseluruhan. Tahapan dalam Proses Inovasi Sebuah ide tidak langsung menjadi inovasi yang matang. Di PT. R.I.E.S, misalnya, proses ini biasanya melalui beberapa fase krusial: - Observasi & Hipotesis: Mengidentifikasi masalah di lapangan. - Eksperimen (Riset): Melakukan pengujian laboratorium dan simulasi data. - Prototyping: Membangun model awal untuk melihat fungsionalitas produk. - Iterasi & Finalisasi: Memperbaiki kekurangan berdasarkan hasil uji coba hingga produk siap diimplementasikan. Tantangan dalam Dunia Riset Melakukan riset bukanlah jalan yang selalu mulus. Para peneliti sering menghadapi kendala teknis, keterbatasan material, hingga kegagalan eksperimen. Namun, di dalam dunia inovasi, kegagalan adalah data. Setiap kegagalan dalam riset memberikan informasi tentang apa yang tidak berfungsi, yang pada akhirnya membawa kita selangkah lebih dekat ke solusi yang sempurna. Kesimpulan Inovasi tanpa riset adalah spekulasi yang berisiko, sementara riset tanpa inovasi adalah pengetahuan yang tidak termanfaatkan. Sinergi antara keduanya adalah mesin penggerak utama bagi kemajuan peradaban manusia. Melalui semangat Riset Inovasi Electrical Sistem, kita tidak hanya sedang membangun perangkat, tetapi sedang merancang masa depan kelistrikan yang lebih cerdas, hijau, dan efisien.

Baca Selengkapnya