Close Menu

    Yeni yazılardan haberdar olun!

    3D yazıcı, elektronik, Arduino ve daha onlarca konuda en yeni blog yazılarını ve haberleri kaçırmayın.

    Trendler

    CH340 Driver Kurulumu? Nasıl İndirilir?

    🧑‍💻 ESP32 Kullanımı – Esp32’ye Nasıl Kod Atılır?

    📡 Yeni Başlayanlar için ESP-NOW

    Instagram YouTube X (Twitter) Facebook LinkedIn Reddit Discord WhatsApp
    Popüler
    • 14 Şubat İçin 14 Hediye – 3D Baskılı Sevgililer Günü Hediyeleri
    • CH340 Driver Kurulumu? Nasıl İndirilir?
    • Arduino ile FM Radyo Uygulaması
    • STM32 ile I2C Oled Ekran Kullanımı
    YouTube Instagram X (Twitter) Reddit LinkedIn Discord WhatsApp
    Robo90 – BlogRobo90 – Blog
    • Anasayfa
    • 3D Baskı
    • Eğitim Serileri
      1. Arduino Eğitim Serisi
      2. IoT Eğitim Serisi
      3. Fusion 360 Eğitim Serisi
      4. Raspberry Pi Eğitim Serisi
      5. STM Eğitim Serisi
      6. View All

      CH340 Driver Kurulumu? Nasıl İndirilir?

      22 Temmuz 2024

      HC-06 ve HC-05 Aralarında Nasıl Haberleşir?

      8 Ağustos 2023

      Arduino ile A4988 ve Nema-17 (Step Motor) Kullanımı

      26 Temmuz 2023

      ESP32CAM ve OV2640 Nasıl Kullanılır?

      5 Ağustos 2023

      🧑‍💻 ESP32 Kullanımı – Esp32’ye Nasıl Kod Atılır?

      26 Temmuz 2023

      🌐 ESP32 ve Arduino IOT ile LED Nasıl Kontrol Edilir?

      26 Temmuz 2023

      Fusion 360’ta Dikdörtgen Komutları – Fusion 360 Eğitim Serisi – Bölüm 3

      21 Eylül 2023

      Fusion 360 Nasıl Kullanılır? – Fusion 360 Eğitim Serisi – Bölüm 2

      24 Ağustos 2023

      Autodesk Fusion 360 Nedir?

      8 Ağustos 2023

      Fusion 360 Öğrenci Lisansı Nedir? Nasıl Alınır?

      5 Ağustos 2023

      Raspberry Pi Pico ile Potansiyometre Kullanarak Buzzer Kullanımı – Bölüm 4

      22 Eylül 2023

      Raspberry Pi Pico ile Potansiyometre Okuma – Bölüm 3

      22 Eylül 2023

      Raspberry Pi Pico ile LED Yakma – Bölüm 2

      17 Ağustos 2023

      Raspberry Pi Pico Nedir? Nasıl Kullanılır? – Bölüm 1

      9 Ağustos 2023

      STM32 ile I2C Oled Ekran Kullanımı

      14 Kasım 2023

      CH340 Driver Kurulumu? Nasıl İndirilir?

      22 Temmuz 2024

      STM32 ile I2C Oled Ekran Kullanımı

      14 Kasım 2023

      Raspberry Pi Pico ile Potansiyometre Kullanarak Buzzer Kullanımı – Bölüm 4

      22 Eylül 2023

      Raspberry Pi Pico ile Potansiyometre Okuma – Bölüm 3

      22 Eylül 2023
    • Projeler
      1. 3D Yazıcı Projeleri
      2. Arduino Projeleri
      3. IoT Projeleri
      4. Raspberry Pi Projeleri
      5. View All

      🐉 Creality Ender 3 Neo İnceleme Yazısı

      26 Temmuz 2023

      Ultimaker Cura’da Filament Değiştirme Özelliği Nedir? Tüm Detaylarıyla Nasıl Kullanılır?

      24 Temmuz 2023

      Arduino ile FM Radyo Uygulaması

      19 Nisan 2024

      Arduino ile EGGBOT Yapımı

      22 Ağustos 2023

      Servo Motor ve LDR ile Güneş Takip Sistemi

      17 Ağustos 2023

      HC-06 ve HC-05 Aralarında Nasıl Haberleşir?

      8 Ağustos 2023

      ESP32CAM ve OV2640 Nasıl Kullanılır?

      5 Ağustos 2023

      ESP-NOW ile RGB LED Kontrolü 🎛️

      4 Ağustos 2023

      📡 Yeni Başlayanlar için ESP-NOW

      3 Ağustos 2023

      ESP32-CAM ile Baskılarınız Yanmasın 📛

      29 Temmuz 2023

      Raspberry Pi Pico ile LED Yakma – Bölüm 2

      17 Ağustos 2023

      Arduino ile FM Radyo Uygulaması

      19 Nisan 2024

      STM32 ile I2C Oled Ekran Kullanımı

      14 Kasım 2023

      Arduino ile EGGBOT Yapımı

      22 Ağustos 2023

      Raspberry Pi Pico ile LED Yakma – Bölüm 2

      17 Ağustos 2023
    • İncelemeler
      1. 🐉 Creality Ender 3 Neo İnceleme Yazısı
      2. 🧑‍💻 ESP32 ‘ye Program Nasıl Yazılır ?
      3. 🌐 ESP32 ve Arduino IOT ile LED Nasıl Kontrol Edilir?
      4. View All

      14 Şubat İçin 14 Hediye – 3D Baskılı Sevgililer Günü Hediyeleri

      10 Şubat 2025

      CH340 Driver Kurulumu? Nasıl İndirilir?

      22 Temmuz 2024

      Arduino ile FM Radyo Uygulaması

      19 Nisan 2024

      STM32 ile I2C Oled Ekran Kullanımı

      14 Kasım 2023

      14 Şubat İçin 14 Hediye – 3D Baskılı Sevgililer Günü Hediyeleri

      10 Şubat 2025

      CH340 Driver Kurulumu? Nasıl İndirilir?

      22 Temmuz 2024

      Arduino ile FM Radyo Uygulaması

      19 Nisan 2024

      STM32 ile I2C Oled Ekran Kullanımı

      14 Kasım 2023

      14 Şubat İçin 14 Hediye – 3D Baskılı Sevgililer Günü Hediyeleri

      10 Şubat 2025

      CH340 Driver Kurulumu? Nasıl İndirilir?

      22 Temmuz 2024

      Arduino ile FM Radyo Uygulaması

      19 Nisan 2024

      STM32 ile I2C Oled Ekran Kullanımı

      14 Kasım 2023

      14 Şubat İçin 14 Hediye – 3D Baskılı Sevgililer Günü Hediyeleri

      10 Şubat 2025

      Creality K1 ve K1 Max 3D Yazıcı Karşılaştırması – İncelemesi

      27 Eylül 2023

      Priz Tipi Wattmetre Hakkında Merak Edilen Her Şey

      7 Ağustos 2023

      BL-Touch Nedir? Nasıl Çalışır? (3D Yazıcı Otomatik Seviyeleme)

      5 Ağustos 2023
    • Mağaza
    Robo90 – BlogRobo90 – Blog
    Home»Projeler»Arduino Projeleri

    Dengede Duramayan Dijital Top Nasıl Yapılır? ⚖️

    Mustafa TopalMustafa Topal014323 Mins Read
    Paylaş
    Twitter LinkedIn Facebook Reddit Email Telegram WhatsApp
    Dengede Duramayan Dijital Top Nasıl Yapılır? ⚖️ - Robo90 - Blog 11
    Dengede duramayan top. Photo by ACROME

    İnternette hemen hemen hepimiz bir tablanın üstüne bir top bırakıldığında neresinden bırakılırsa bırakılsın motorları sayesinde hemen topu merkezine alıp dengede durmasını sağlayan top dengede tutan robot projelerine denk gelmişizdir. İzlemesi son derece keyifli ve kafamızda hep “ Acaba nasıl üretiliyor, ben de yapabilir miyim ki ? ” sorularını getiriyor. Sizin de kafanıza bu tarz sorular geliyorsa, gerçek toplar ve gerçek sistemler kadar olmasa da dijital top nasıl dengede tutabileceğinizi merak ediyor ve çevrenizi etkilemek istiyorsanız gelin projemizi yapmaya başlayalım.

    İçindekiler gizle
    1. Ne Kullanmam Gerekiyor ki ?
    2. Donanım kısmı
    3. Peki Nasıl Çalışıyor ?
    4. Projenin Yazılımı Nasıl Çalışır ?
    5. Kodun tamamı ;
    Arduino Uno'ya bağlı Dot Matrix modülü ve MPU-6050 modülü.

    Fotoğraftan da anlaşılabileceği gibi ne kadar basit bir sistem değil mi ? Proje bir adet eksen sensörü sayesinde hareketi algılayıp 8×8 Dot Matrix Display ekranında hareketin tam tersi yönde dijital top hareket etmesini sağlıyor. Bu sayede dijital top sanki dijital bir ekranda dengede kalmaya çalışıyor.

    MPU-6050 modülünü eğince Dot Matrix modülündeki top da tam tersi yönde hareket ediyor.

    Ne Kullanmam Gerekiyor ki ?

    Projemiz için ihtiyacımız olan tüm malzemelerin listesi ;

    • Arduino Uno: https://www.robo90.com/arduino-uno-r3-smd-klonch340-cipli-usb-kablo-hediyeli
    • Max7219 8×8 Dot Matrix Display Modülü – Kırmızı: https://www.robo90.com/max7219-8×8-dot-matrix-display-modulu-kirmizi
    • MPU6050 6 Eksen İvme ve Gyro Sensörü: https://www.robo90.com/mpu6050-6-eksen-ivme-ve-gyro-sensoru-gy-521
    • 40lı Ayrılabilen Dişi-Erkek Jumper Kablo: https://www.robo90.com/40li-ayrilabilen-disi-erkek-jumper-kablo-20cm-arduino-uyu

    Donanım kısmı

    Önce 8×8 Max7219 8×8 Dot Matrix Display Modülümüzü Arduino Uno ile bağlantılarını yaparak başlayalım. ( Fotoğraf 1.0 )

    Dot Matrix Display Modülü
    Fotoğraf 1.0

    Göründüğü gibi 8×8 matrix modülümüzün sırasıyla VCC, GND, DIN, CS, CLK pinleri bulunmakta. Biz bu projemizde bu pinlerimizi Arduinonun şu pinlerine bağladık;

    • VCC = Arduinonun +5V pini
    • GND = Arduinonun GND pini
    • DIN = Arduinonun 12. pini
    • CS = Arduinonun 11. pini
    • CLK = Arduinonun 10. pini

    Bu bağlantıları yaptıktan sonra MPU6050 6 Eksen İvme ve Gyro Sensörünü nasıl bağlayacağımıza geçelim. ( Fotoğraf 1.1 )

    MPU-6050 modülü
    Fotoğraf 1.1

    Göründüğü gibi MPU6050 6 Eksen İvme ve Gyro Sensörünün sırasıyla VCC, GND, SCL, SDA, XDA, XCL, AD0 ve INT pinleri bulunmakta. Biz projemiz için ilk 4 pin olan VCC, GND, SCL ve SDA pinlerini kullanacağız. Bu pinleri sırasıyla Arduinonun şu pinlerine bağladık;

    • VCC = Arduinonun +5V pini
    • GND = Arduinonun GND pini
    • SCL = Arduinonun A5 pinine
    • SDA = Arduinonun A4 pinine

    Gerekli olan tüm bağlantıları sırasıyla yaptıktan sonra şimdi projenin çalışma mantığına bakalım.

    Peki Nasıl Çalışıyor ?

    Yazımızın başlarında da bahsettiğimiz gibi aslında Proje bir adet eksen sensörü sayesinde hareketi algılayıp 8×8 Dot Matrix Display ekranında hareketin tam tersi yönde dijital top hareket etmesini sağlıyor. Bu sayede dijital top sanki dijital bir ekranda dengede kalmaya çalışıyormuş gibi görünüyor. Eksen sensörünün sadece X ve Y ekseni için ürettiği verileri kullanıyoruz. Sensörümüzü X ekseni için her bir hareketinde +-10, Y ekseni için de +-10 değerlerini üretecek şekilde ayarlıyoruz. ( İleride kaynak kodu incelerken bu kısıma değineceğiz ) ( Fotoğraf 1.2 )

    MPU-6050 modülünün x ve y eksenlerine bölünmüş hali, x ve y ekseninde +-10 değer döndürüyor.
    Fotoğraf 1.2

    Göründüğü gibi eksen sensörü her yönde hareket ettirdiğimizde eğime bağlı olarak konumu değişiyor. ( Fotoğraf 1.3 )

    MPU-6050'yi ü her yönde hareket ettirdiğimizde eğime bağlı olarak dijital topun konumu değişiyor.
    Fotoğraf 1.3

    Şimdi ise 8×8 Dot Matrix’imizi aşağıdaki fotoğrafta göründüğü gibi dört parçaya bölelim. ( Fotoğraf 1.4 )

    8x8 Dot Matrix’imizi  dört parçaya bölelim. Sonrasında Dot matrix modülümüzü koordinat eksenindeki ızgaralara bölelim
    Fotoğraf 1.4

    Daha sonra bu bölgelere sırasıyla 1, 2, 3, 4 diyelim. Hatırlarsanız eksen sensörü x ve y ekseni için +-10 arasında değerler üretiyordu. Bu yüzden ızgaranın eksenleri kestiği her bir noktayı sayısal parçalara ayırabiliriz ( -5, -2.5, -0, 2.5, 5 gibi ) Bu sayede her bir 64 farklı LED’in konumunu bulabiliriz. ( Fotoğraf 1.5 )

    Koordinat eksenini bölgelere ayıralım ve ızgaraların kestiği her bir noktaya +-10 arasında değerler verelim. Dört parçaya böldüğü için sırasıyla 0, 2,5, 5, 7,5 ve 10 değerlerini verdik.
    Fotoğraf 1.5

    Yukarıdaki resme bakarak her bir LED’in konumunu ve bölgesini rahatlıkla söyleyebiliriz. Mesela 1. satır 2. sütundaki LED’in konumu için -7.5<x<-5 ve 7.5<y<10 , 2. bölgede diyebiliriz.

    Hatırlarsanız eksen sensörümüz x ve y ekseni için +- 10 arasında değerler üretiyordu. Yani ben sensörüme doğru eğimi verirsem -7.5<x<-5 ve 7.5<y<10 arasında bir değeri tutturabilirim ve eğer bir if komutu yazıp -7.5<x<-5 ve 7.5<y<10 arasında 1. satır 2. sütundaki LED’ i aç dersem doğru eğimde 8×8 Dot Matrix modülünde o LED açılacaktır.

    Peki ya eksen sensörü -7.5<x<-5 ve 7.5<y<10 arasındaki değerleri üretirken 1. satır 2. sütunun başlangıç noktası 0’ a göre aynalarsam ne olur ? Konum 8. satır ve 7. sütun olur. Peki o konumdaki LED’in yanmasını istersem ? İşte bu ! Benim eksen sensörümün tam tersi konumunda topumuz hareket ediyor. Asla düşürülemez dijital bir top !

    MPU-6050'yi eğince top tam tersi istikamette Dengede durmaya çalışıyor
    Fotoğraf 1.6

    Tabi ki de düşürebiliriz. Topumuzun ekrandan düşmemesi için bir çerçeve yaparsak eğer if-else sayımız 32’den 25’e düşer. Bu sayede 25 farklı ihtimali kodlarsak Ne olursa olsun düşüremeyeceğimiz bir dijital top yapmış oluruz. ( Fotoğraf 1.6 )

    Projenin Yazılımı Nasıl Çalışır ?

    Gerekli olan kütüphaneleri programımızın içine yazıyoruz.

    #include "LedControl.h"
    #include <Adafruit_MPU6050.h>
    #include <Adafruit_Sensor.h>
    #include <Wire.h>

    Setup kısmında ise hem 8×8 Dot Matrix ekranı hem de MPU-6050 sensörü için gerekli olan kurulum kodlarını yazıyoruz.

    void setup() {
      Serial.begin(115200);
      while (!Serial)
        delay(10); // will pause Zero, Leonardo, etc until serial console opens
    
      Serial.println("Adafruit MPU6050 test!");
    
      // Try to initialize!
      if (!mpu.begin()) {
        Serial.println("Failed to find MPU6050 chip");
        while (1) {
          delay(10);
        }
      }
      Serial.println("MPU6050 Found!");
    
      mpu.setAccelerometerRange(MPU6050_RANGE_8_G);
      Serial.print("Accelerometer range set to: ");
      switch (mpu.getAccelerometerRange()) {
      case MPU6050_RANGE_2_G:
        Serial.println("+-2G");
        break;
      case MPU6050_RANGE_4_G:
        Serial.println("+-4G");
        break;
      case MPU6050_RANGE_8_G:
        Serial.println("+-8G");
        break;
      case MPU6050_RANGE_16_G:
        Serial.println("+-16G");
        break;
      }
      mpu.setGyroRange(MPU6050_RANGE_500_DEG);
      Serial.print("Gyro range set to: ");
      switch (mpu.getGyroRange()) {
      case MPU6050_RANGE_250_DEG:
        Serial.println("+- 250 deg/s");
        break;
      case MPU6050_RANGE_500_DEG:
        Serial.println("+- 500 deg/s");
        break;
      case MPU6050_RANGE_1000_DEG:
        Serial.println("+- 1000 deg/s");
        break;
      case MPU6050_RANGE_2000_DEG:
        Serial.println("+- 2000 deg/s");
        break;
      }
    
      mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);
      Serial.print("Filter bandwidth set to: ");
      switch (mpu.getFilterBandwidth()) {
      case MPU6050_BAND_260_HZ:
        Serial.println("260 Hz");
        break;
      case MPU6050_BAND_184_HZ:
        Serial.println("184 Hz");
        break;
      case MPU6050_BAND_94_HZ:
        Serial.println("94 Hz");
        break;
      case MPU6050_BAND_44_HZ:
        Serial.println("44 Hz");
        break;
      case MPU6050_BAND_21_HZ:
        Serial.println("21 Hz");
        break;
      case MPU6050_BAND_10_HZ:
        Serial.println("10 Hz");
        break;
      case MPU6050_BAND_5_HZ:
        Serial.println("5 Hz");
        break;
      }
    
      Serial.println("");
      delay(100);
    
    
      /*
       The MAX72XX is in power-saving mode on startup,
       we have to do a wakeup call
       */
      lc.shutdown(0,false);
      /* Set the brightness to a medium values */
      lc.setIntensity(0,8);
      /* and clear the display */
      lc.clearDisplay(0);
    }

    Sonrasında ekranda topun tüm konumlarının LCD için kütüphanesini yazıyoruz.

    void middle() {
      /* here is the data for the characters */
      
      byte ball[8]={B11111111,B10000001,B10000001,B10011001,B10011001,B10000001,B10000001,B11111111};
      /* now display them one by one with a small delay */
      
      lc.setRow(0,0,ball[0]);
      lc.setRow(0,1,ball[1]);
      lc.setRow(0,2,ball[2]);
      lc.setRow(0,3,ball[3]);
      lc.setRow(0,4,ball[4]);
      lc.setRow(0,5,ball[5]);
      lc.setRow(0,6,ball[6]);
      lc.setRow(0,7,ball[7]);
      lc.setRow(0,8,ball[8]);
      
      lc.setRow(0,0,0);
      lc.setRow(0,1,0);
      lc.setRow(0,2,0);
      lc.setRow(0,3,0);
      lc.setRow(0,4,0);
      lc.setRow(0,5,0);
      lc.setRow(0,6,0);
      lc.setRow(0,7,0);
      lc.setRow(0,8,0);
      
    }

    Bu sadece dijital top orta kısımda olduğu ve çevçevenin kodlandığı durum. ( Fotoğraf 1.7 )

    Dijital top Dot Matrix modülünün tam ortasındayken Dengede durmaya çalışıyor.
    Fotoğraf 1.7

    Sonrasında ana void loop fonksiyonunda 25 farklı durum için 25 tane if kodluyoruz. Bu İf-Else yapılarının tamamını kodun tamamında bulabilirsiniz.

    //y ekseni if-else
      if ( a.acceleration.x<=2.5 && a.acceleration.x>=-2.5 && a.acceleration.y<=5 && a.acceleration.y>=2.5 ){
        middletop1();
      }
      if ( a.acceleration.x<=2.5 && a.acceleration.x>=-2.5 && a.acceleration.y<=7.5 && a.acceleration.y>=5 ){
        middletop2();
      }
      
      if ( a.acceleration.x<=2.5 && a.acceleration.x>=-2.5 && a.acceleration.y<=0 && a.acceleration.y>=-2.5 ){
        middlebottom1();
      }
      if ( a.acceleration.x<=2.5 && a.acceleration.x>=-2.5 && a.acceleration.y<=-2.5 && a.acceleration.y>=-5 ){
        middlebottom2();
      }
      
      //y ekseni if bitiş 

    Kodun tamamı ;

    Kaynak Kod

    //We always have to include the library

    #include “LedControl.h”

    #include <Adafruit_MPU6050.h>

    #include <Adafruit_Sensor.h>

    #include <Wire.h>

    Adafruit_MPU6050 mpu;

    /*

     Now we need a LedControl to work with.

     ***** These pin numbers will probably not work with your hardware *****

     pin 12 is connected to the DataIn

     pin 11 is connected to the CLK

     pin 10 is connected to LOAD

     We have only a single MAX72XX.

     */

    LedControl lc=LedControl(12,10,11,1 );

    /* we always wait a bit between updates of the display */

    unsigned long delaytime=100;

    void setup() {

      Serial.begin(115200);

      while (!Serial)

        delay(10); // will pause Zero, Leonardo, etc until serial console opens

      Serial.println(“Adafruit MPU6050 test!”);

      // Try to initialize!

      if (!mpu.begin()) {

        Serial.println(“Failed to find MPU6050 chip”);

        while (1) {

          delay(10);

        }

      }

      Serial.println(“MPU6050 Found!”);

      mpu.setAccelerometerRange(MPU6050_RANGE_8_G);

      Serial.print(“Accelerometer range set to: “);

      switch (mpu.getAccelerometerRange()) {

      case MPU6050_RANGE_2_G:

        Serial.println(“+-2G”);

        break;

      case MPU6050_RANGE_4_G:

        Serial.println(“+-4G”);

        break;

      case MPU6050_RANGE_8_G:

        Serial.println(“+-8G”);

        break;

      case MPU6050_RANGE_16_G:

        Serial.println(“+-16G”);

        break;

      }

      mpu.setGyroRange(MPU6050_RANGE_500_DEG);

      Serial.print(“Gyro range set to: “);

      switch (mpu.getGyroRange()) {

      case MPU6050_RANGE_250_DEG:

        Serial.println(“+- 250 deg/s”);

        break;

      case MPU6050_RANGE_500_DEG:

        Serial.println(“+- 500 deg/s”);

        break;

      case MPU6050_RANGE_1000_DEG:

        Serial.println(“+- 1000 deg/s”);

        break;

      case MPU6050_RANGE_2000_DEG:

        Serial.println(“+- 2000 deg/s”);

        break;

      }

      mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);

      Serial.print(“Filter bandwidth set to: “);

      switch (mpu.getFilterBandwidth()) {

      case MPU6050_BAND_260_HZ:

        Serial.println(“260 Hz”);

        break;

      case MPU6050_BAND_184_HZ:

        Serial.println(“184 Hz”);

        break;

      case MPU6050_BAND_94_HZ:

        Serial.println(“94 Hz”);

        break;

      case MPU6050_BAND_44_HZ:

        Serial.println(“44 Hz”);

        break;

      case MPU6050_BAND_21_HZ:

        Serial.println(“21 Hz”);

        break;

      case MPU6050_BAND_10_HZ:

        Serial.println(“10 Hz”);

        break;

      case MPU6050_BAND_5_HZ:

        Serial.println(“5 Hz”);

        break;

      }

      Serial.println(“”);

      delay(100);

      /*

       The MAX72XX is in power-saving mode on startup,

       we have to do a wakeup call

       */

      lc.shutdown(0,false);

      /* Set the brightness to a medium values */

      lc.setIntensity(0,8);

      /* and clear the display */

      lc.clearDisplay(0);

    }

    /*

     This method will display the characters for the

     word “Arduino” one after the other on the matrix.

     (you need at least 5×7 leds to see the whole chars)

     */

     //y ekseni

    void middle() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10011001,B10011001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void middletop1() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10011001,B10011001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void middletop2() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10011001,B10011001,B10000001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void middlebottom1() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10011001,B10011001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void middlebottom2() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10000001,B10011001,B10011001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    //y ekseni bitiş

    //x ekseni başlangıç

    void middleright1() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10001101,B10001101,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void middleright2() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000111,B10000111,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void middleleft1() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10110001,B10110001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void middleleft2() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B11100001,B11100001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    //x ekseni bitiş

    //1. alan

    void area1topright1() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10001101,B10001101,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area1topright2() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10001101,B10001101,B10000001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area1topright4() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000111,B10000111,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area1topright5() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000111,B10000111,B10000001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area1topright7() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000111,B10000111,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area1topright8() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B01000111,B10000111,B10000001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    //1. alan bitiş

    //2. alan

    void area2left1() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10110001,B10110001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area2left2() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10110001,B10110001,B10000001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area2left4() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B11100001,B11100001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area2left5() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B11100001,B11100001,B10000001,B10000001,B10000001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    //2. alan bitiş

    //3. alan

    void area3left1() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10110001,B10110001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area3left2() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10000001,B10110001,B10110001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area3left4() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B11100001,B11100001,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area3left5() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10000001,B11100001,B11100001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    //3. alan bitiş

    //4. alan

    void area4right1() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10001101,B10001101,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area4right2() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10000001,B10001101,B10001101,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area4right4() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10000111,B10000111,B10000001,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void area4right5() {

      /* here is the data for the characters */

      byte ball[8]={B11111111,B10000001,B10000001,B10000001,B10000001,B10000111,B10000111,B11111111};

      /* now display them one by one with a small delay */

      lc.setRow(0,0,ball[0]);

      lc.setRow(0,1,ball[1]);

      lc.setRow(0,2,ball[2]);

      lc.setRow(0,3,ball[3]);

      lc.setRow(0,4,ball[4]);

      lc.setRow(0,5,ball[5]);

      lc.setRow(0,6,ball[6]);

      lc.setRow(0,7,ball[7]);

      lc.setRow(0,8,ball[8]);

      lc.setRow(0,0,0);

      lc.setRow(0,1,0);

      lc.setRow(0,2,0);

      lc.setRow(0,3,0);

      lc.setRow(0,4,0);

      lc.setRow(0,5,0);

      lc.setRow(0,6,0);

      lc.setRow(0,7,0);

      lc.setRow(0,8,0);

    }

    void loop() {

      sensors_event_t a, g, temp;

      mpu.getEvent(&a, &g, &temp);

      if ( a.acceleration.x<2.5 && a.acceleration.x>0 && a.acceleration.y<2.5 && a.acceleration.y>0 ){

        middle();

      }

      //y ekseni if-else

      if ( a.acceleration.x<2.5 && a.acceleration.x>-2.5 && a.acceleration.y<5 && a.acceleration.y>2.5 ){

        middletop1();

      }

      if ( a.acceleration.x<2.5 && a.acceleration.x>-2.5 && a.acceleration.y<7.5 && a.acceleration.y>5 ){

        middletop2();

      }

      if ( a.acceleration.x<2.5 && a.acceleration.x>-2.5 && a.acceleration.y<0 && a.acceleration.y>-2.5 ){

        middlebottom1();

      }

      if ( a.acceleration.x<2.5 && a.acceleration.x>-2.5 && a.acceleration.y<-2.5 && a.acceleration.y>-5 ){

        middlebottom2();

      }

      //y ekseni if bitiş

      //x ekseni if

      if ( a.acceleration.x<5 && a.acceleration.x>2.5 && a.acceleration.y<2.5 && a.acceleration.y>-2.5 ){

        middleright1();

      }

      if ( a.acceleration.x<7.5 && a.acceleration.x>5 && a.acceleration.y<2.5 && a.acceleration.y>-2.5 ){

        middleright2();

      }

      if ( a.acceleration.x<-2.5 && a.acceleration.x>-5 && a.acceleration.y<2.5 && a.acceleration.y>-2.5 ){

        middleleft1();

      }

      if ( a.acceleration.x<-5 && a.acceleration.x>-7.5 && a.acceleration.y<2.5 && a.acceleration.y>-2.5 ){

        middleleft2();

      }

      //x ekseni if bitiş

      //1. alan if

      if ( a.acceleration.x<5 && a.acceleration.x>2.5 && a.acceleration.y<5 && a.acceleration.y>2.5 ){

        area1topright1();

      }

      if ( a.acceleration.x<5 && a.acceleration.x>2.5 && a.acceleration.y<7.5 && a.acceleration.y>5 ){

        area1topright2();

      }

      if ( a.acceleration.x<7.5 && a.acceleration.x>5 && a.acceleration.y<5 && a.acceleration.y>2.5 )

      {

        area1topright4();

      }

      if ( a.acceleration.x<7.5 && a.acceleration.x>5 && a.acceleration.y<7.5 && a.acceleration.y>5 ){

        area1topright5();

      }

      //1. alan bitti

      //2. alan

      if ( a.acceleration.x<-2.5 && a.acceleration.x>-5 && a.acceleration.y<5 && a.acceleration.y>2.5 ){

        area2left1();

      }

      if ( a.acceleration.x<-2.5 && a.acceleration.x>-5 && a.acceleration.y<10 && a.acceleration.y>5 ){

        area2left2();

      }

      if ( a.acceleration.x<-5 && a.acceleration.x>-10 && a.acceleration.y<5 && a.acceleration.y>2.5 ){

        area2left4();

      }

      if ( a.acceleration.x<-5 && a.acceleration.x>-10 && a.acceleration.y<10 && a.acceleration.y>5 ){

        area2left5();

      }

      //2. alan bitti

      //3. alan

      if ( a.acceleration.x<-2.5 && a.acceleration.x>-5 && a.acceleration.y<-2.5 && a.acceleration.y>-5 ){

        area3left1();

      }

      if ( a.acceleration.x<-2.5 && a.acceleration.x>-5 && a.acceleration.y<-5 && a.acceleration.y>=-10 ){

        area3left2();

      }

      if ( a.acceleration.x<-5 && a.acceleration.x>-10 && a.acceleration.y<-2.5 && a.acceleration.y>-5 ){

        area3left4();

      }

      if ( a.acceleration.x<-5 && a.acceleration.x>-10 && a.acceleration.y<-5 && a.acceleration.y>-10 ){

        area3left5();

      }

      //3. alan bitti

      //4. alan

      if ( a.acceleration.x<5 && a.acceleration.x>2.5 && a.acceleration.y<-2.5 && a.acceleration.y>-5 ){

        area4right1();

      }

      if ( a.acceleration.x<5 && a.acceleration.x>2.5 && a.acceleration.y<-5 && a.acceleration.y>-10 ){

        area4right2();

      }

      if ( a.acceleration.x<10 && a.acceleration.x>5 && a.acceleration.y<-2.5 && a.acceleration.y>=-5 ){

        area4right4();

      }

      if ( a.acceleration.x<10 && a.acceleration.x>5 && a.acceleration.y<-5 && a.acceleration.y>-10 ){

        area4right5();

      }

    }

    Bu projemizde de çevrenize gösterdiğiniz zaman gülümsetecek, insanların şaşıracağı, çözümlerinin de anlaşılmasının da oldukça basit olduğu dengede duramayan dijital top projesini inceledik. Bu tarz çevrenizi şaşırtacak veya bakış açınızı genişletecek başka projeler arıyorsanız aşağıdaki projelerimi inceleyebilirsiniz.

    Yazının başındaki fotoğraf https://www.youtube.com/watch?v=tPr6-Rh0m-8 videosundan alınmıştır

    Share. Twitter Facebook LinkedIn Reddit Email Telegram WhatsApp
    Previous ArticleArduino ile Nabız Ölçer Yapımı – SSD1306 OLED Ekran ve Pulse Sensörü
    Next Article 📡 Yeni Başlayanlar için ESP-NOW
    Mustafa Topal

    Benzer Yazılar

    14 Şubat İçin 14 Hediye – 3D Baskılı Sevgililer Günü Hediyeleri

    5 Mins Read0360 ViewsBy Ali Berk Ercan

    Arduino ile FM Radyo Uygulaması

    4 Mins Read01.142 ViewsBy Şirzat Açıkgöz

    Transistör Nedir? Ne İşe Yarar? Nasıl Çalışır?

    4 Mins Read0880 ViewsBy Ali Berk Ercan

    Peltier İle Evinizi Kışın Isıtabilir/Yazın Serinletebilirsiniz!

    4 Mins Read01.069 ViewsBy Eray Yılmaz

    Arduino ile EGGBOT Yapımı

    4 Mins Read0374 ViewsBy Baki Ateş

    Raspberry Pi Pico ile LED Yakma – Bölüm 2

    2 Mins Read0533 ViewsBy Ahmet Miraç Çıtak
    Add A Comment
    Leave A Reply Cancel Reply

    Popüler Yazılar
    Arduino Eğitim Serisi

    CH340 Driver Kurulumu? Nasıl İndirilir?

    4 Mins Read0By Ali Berk Ercan
    Featured

    🧑‍💻 ESP32 Kullanımı – Esp32’ye Nasıl Kod Atılır?

    3 Mins Read1By Mustafa Topal
    Genel

    📡 Yeni Başlayanlar için ESP-NOW

    9 Mins Read3By Mustafa Topal
    Gündem

    14 Şubat İçin 14 Hediye – 3D Baskılı Sevgililer Günü Hediyeleri

    10 Şubat 2025

    CH340 Driver Kurulumu? Nasıl İndirilir?

    22 Temmuz 2024

    Arduino ile FM Radyo Uygulaması

    19 Nisan 2024

    STM32 ile I2C Oled Ekran Kullanımı

    14 Kasım 2023
    • Facebook 381
    • Twitter 165
    • Instagram 3.8K
    • YouTube 19.2K
    İçindekiler gizle
    1. Ne Kullanmam Gerekiyor ki ?
    2. Donanım kısmı
    3. Peki Nasıl Çalışıyor ?
    4. Projenin Yazılımı Nasıl Çalışır ?
    5. Kodun tamamı ;
    Hakkımızda
    Hakkımızda

    Robo90, 2021 yılında Ankara'da kurulmuş bir firmadır. Makerlara, mühendislere, elektronik ve teknoloji tutkunlarına kaliteli bir alışveriş deneyimi sunmayı amaçlamaktadır. Arduino, 3D yazıcı modelleri, 3D yazıcı parçaları, Raspberry Pi, sensörler, devre elemanları, elektronik kartlar, komponentler ve robotik kodlama eğitim ürünleri gibi geniş bir yelpazede kaliteli binlerce çeşit ürünü uygun fiyatlarla bulabileceğiniz güvenilir bir platform oluşturmayı ve bunu korumayı hedeflemektedir.

    E-posta: info@robo90.com
    WhatsApp: 0312 429 01 90

    Yeni Yazılar

    14 Şubat İçin 14 Hediye – 3D Baskılı Sevgililer Günü Hediyeleri

    10 Şubat 2025

    CH340 Driver Kurulumu? Nasıl İndirilir?

    22 Temmuz 2024

    Arduino ile FM Radyo Uygulaması

    19 Nisan 2024

    STM32 ile I2C Oled Ekran Kullanımı

    14 Kasım 2023
    Çok Okunanlar

    CH340 Driver Kurulumu? Nasıl İndirilir?

    22 Temmuz 2024

    🧑‍💻 ESP32 Kullanımı – Esp32’ye Nasıl Kod Atılır?

    26 Temmuz 2023

    📡 Yeni Başlayanlar için ESP-NOW

    3 Ağustos 2023

    Creality K1 ve K1 Max 3D Yazıcı Karşılaştırması – İncelemesi

    27 Eylül 2023
    YouTube Instagram LinkedIn Discord Facebook X (Twitter) WhatsApp
    • Anasayfa
    • 3D Baskı Hizmeti – Fiyat Teklifi Alın
    • Yazılar
    • Mağaza
    • Yazar Ekibimiz
    • İletişim
    © 2025 Robo90. Tüm hakları saklıdır. Robo90 Blog.

    Type above and press Enter to search. Press Esc to cancel.