Results 1 to 1 of 1
  1. #1
    Wii U Section Moderator
    Computer Engineer
    MrOwnership's Avatar

    Badge

    Join Date
    Jun 2011
    Location
    Maryland
    Posts
    1,435
    Points
    2,862
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Location
    Maryland
    Posts
    1,435
    Points
    2,862
    Gamer IDs

    Steam ID: MrOwnership Wii Code: MrOwnership

    Default 10x10 LED Matrix + LED Matrix Frame Creator Program

    PROGRAM UPDATED

    Here is a quick video demo of my LED frame creator program I made. I used it to make a simple animation then uploaded it to my 10x10 LED matrix that I made. The matrix itself is just a expansion of my 3x3 matrix. 10x10 is as big as I could go because the Arduino Uno only has 20 GPIO pins.



    LED Matric Frame Creator Program
    https://mega.co.nz/#!Xc0iHaYC!Z3jbbs...f4I05RKuNOlouU

    Arduino Matrix Code
    Code:
    int cathode[] = {0,1,2,3,4,5,6,7,8,9};
    int anode[] = {10,11,12,13,A0,A1,A2,A3,A4,A5};
    
    int test[][10][10] = {{7},{{1,0,0,0,0,0,0,0,0,1}, {0,1,0,0,0,0,0,0,1,0}, {0,0,1,0,0,0,0,1,0,0}, {0,0,0,1,0,0,1,0,0,0}, {0,0,0,0,1,1,0,0,0,0}, {0,0,0,0,1,1,0,0,0,0}, {0,0,0,1,0,0,1,0,0,0}, {0,0,1,0,0,0,0,1,0,0}, {0,1,0,0,0,0,0,0,1,0}, {1,0,0,0,0,0,0,0,0,1}},{{1,1,0,0,0,0,0,0,1,1}, {1,1,1,0,0,0,0,1,1,1}, {0,1,1,1,0,0,1,1,1,0}, {0,0,1,1,1,1,1,0,0,0}, {0,0,0,1,1,1,1,0,0,0}, {0,0,0,1,1,1,1,0,0,0}, {0,0,1,1,1,1,1,1,0,0}, {0,1,1,1,0,0,1,1,1,0}, {1,1,1,0,0,0,0,1,1,1}, {1,1,0,0,0,0,0,0,1,1}},{{0,1,1,0,0,0,0,1,1,0}, {1,0,1,1,0,0,1,1,0,1}, {1,1,0,1,1,1,1,0,1,1}, {0,1,1,0,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0,0}}};
    
    
    void setup() {
      for(int i = 0; i < 10; i++){
          pinMode(cathode[i], OUTPUT);
          digitalWrite(cathode[i], LOW);
          pinMode(anode[i], OUTPUT);
          digitalWrite(anode[i], HIGH);
      }
    }
    
    void loop() {
      for(int i = 1; i <= test[0][0][0]; i++)
        writeMatrix(test[i], 10, 10);
      for(int i = test[0][0][0]; i >= 1; i--)
        writeMatrix(test[i], 10, 10);
      off();
    }
    
    void writeMatrix(int frame[][10], int size, int time){
      for(int j = 0; j < time; j++){
        for(int i = 0; i < size; i++){
          for(int k = 0; k < size; k++)
            digitalWrite(cathode[k], frame[i][k]); 
          digitalWrite(anode[i], LOW);
          delay(1);
          digitalWrite(anode[i], HIGH);
        }
      }
    }
    
    void off(){
      for(int i = 0; i < 10; i++)
        digitalWrite(anode[i], HIGH);
    }
    Schematic


    Breadboard and LED Matrix Pictures

    1 Not allowed! Not allowed!
    Last edited by MrOwnership; 03-01-2014 at 07:08 PM.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 03:48 AM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.