//-------------------------------------------------------------------------------------- // Simple POV with 5 leds // Code will display my Son's name "Gautam" // Author Amit Jain // Version 1.0 // date : 3rd Nov 2014 // Define characters to be displayed // Character data stored in integer type array - 1 dimensional array // using 4 columns to display characters, W and M characters needs 5 columns // Small characters missing below : g, p, q, s, v, //-------------------------------------------------------------------------------------- // Small letters int SmallA[] = {0,0,1,1,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,1}; int SmallB[] = {1,1,1,1,1,0,1,0,0,1,0,1,0,0,1,0,0,1,1,0}; int SmallC[] = {0,0,1,1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,0,0}; int SmallD[] = {0,0,1,1,0,0,1,0,0,1,0,1,0,0,1,1,1,1,1,1}; int SmallE[] = {0,0,1,1,0,0,1,1,0,1,0,1,1,0,1,0,0,1,0,0}; int SmallF[] = {0,1,1,1,1,1,0,1,0,0,1,0,1,0,0,0,0,0,0,0}; int SmallH[] = {1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,1,1}; int SmallI[] = {0,0,0,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1}; int SmallJ[] = {0,0,0,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0}; int SmallK[] = {1,1,1,1,1,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1}; int SmallL[] = {0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,1}; int SmallM[] = {0,0,1,1,1,0,1,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,1,1,1}; int SmallN[] = {0,0,1,1,1,0,1,0,0,0,0,1,0,0,0,0,0,1,1,1}; int SmallO[] = {0,0,1,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,1,0}; int SmallR[] = {0,1,0,0,0,0,0,1,1,1,0,1,0,0,0,0,1,0,0,0}; int SmallT[] = {1,1,1,1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0}; int SmallU[] = {0,1,1,1,0,0,0,0,0,1,0,0,0,0,1,0,1,1,1,0}; int SmallW[] = {0,1,1,1,0,0,0,0,0,1,0,0,1,1,0,0,0,0,0,1,0,1,1,1,0}; int SmallX[] = {0,1,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,1}; int SmallY[] = {0,1,0,0,0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0}; int SmallZ[] = {0,1,0,0,1,0,1,0,1,1,0,1,1,0,1,0,1,0,0,1}; //-------------------------------------------------------------------------------------- // Capital Letters int BigA[] = {0,1,1,1,1,1,0,0,1,0,1,0,0,1,0,0,1,1,1,1}; int BigB[] = {1,1,1,1,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0}; int BigC[] = {0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1}; int BigD[] = {1,1,1,1,1,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0}; int BigE[] = {1,1,1,1,1,1,0,1,0,1,1,0,1,0,1,1,0,0,0,1}; int BigF[] = {1,1,1,1,1,1,0,1,0,0,1,0,1,0,0,1,0,0,0,0}; int BigG[] = {0,1,1,1,0,1,0,0,0,1,1,0,1,0,1,0,0,1,1,0}; int BigH[] = {1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,1,1,1,1,1}; int BigI[] = {1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1}; int BigJ[] = {1,0,0,1,0,1,0,0,0,1,1,1,1,1,0,1,0,0,0,0}; int BigK[] = {1,1,1,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1}; int BigL[] = {1,1,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1}; int BigM[] = {1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,1,0,0,0,0,1,1,1,1,1}; int BigN[] = {1,1,1,1,1,0,1,0,0,0,0,0,1,0,0,1,1,1,1,1}; int BigO[] = {0,1,1,1,0,1,0,0,0,1,1,0,0,0,1,0,1,1,1,0}; int BigP[] = {0,1,1,1,1,1,0,0,1,0,1,0,0,1,0,0,1,1,0,0}; int BigQ[] = {0,1,1,1,0,1,0,0,0,1,1,0,0,1,0,0,1,1,0,1}; int BigR[] = {0,1,1,1,1,1,0,0,1,0,1,0,0,1,0,0,1,1,0,1}; int BigS[] = {0,1,0,0,1,1,0,1,0,1,1,0,1,0,1,1,0,0,1,0}; int BigT[] = {1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0}; int BigU[] = {1,1,1,1,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1,1}; int BigV[] = {1,1,1,1,0,0,0,0,0,1,0,0,0,0,1,1,1,1,1,0}; int BigW[] = {1,1,1,1,1,0,0,0,0,1,0,1,1,1,0,0,0,0,0,1,1,1,1,1,1}; int BigX[] = {1,1,0,1,1,0,0,1,0,0,0,0,1,0,0,1,1,0,1,1}; int BigY[] = {1,1,0,0,0,0,0,1,0,1,0,0,1,1,0,1,1,0,0,0}; int BigZ[] = {1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,1}; //-------------------------------------------------------------------------------------- /* not needed for test my goal // Numbers int ONE[] = {1,0,0,0,1, 1,1,1,1,1, 0,0,0,0,1}; int TWO[] = {0,1,0,1,1, 1,0,1,0,1, 0,1,0,0,1}; int THREE[] = {1,0,1,0,1, 1,0,1,0,1, 1,1,1,1,1}; int FOUR[] = {1,1,1,0,0, 0,0,1,0,0, 1,1,1,1,1}; int FIVE[] = {1,0,1,0,1, 1,0,1,0,1, 1,0,1,1,1}; int SIX[] = {1,0,1,1,1, 1,0,1,0,1, 1,0,1,1,1}; int SEVEN[] = {1,0,0,0,0, 1,0,0,0,0, 1,1,1,1,1}; int EIGHT[] = {1,1,1,1,1, 1,0,1,0,1, 1,1,1,1,1}; int NINE[] = {1,1,1,0,0, 1,0,1,0,0, 1,1,1,1,1}; int ZERO[] = {1,1,1,1,1, 1,0,0,0,1, 1,1,1,1,1}; */ //-------------------------------------------------------------------------------------- // Special characters int ZSPACE[] = {0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0}; int BigSmile[] = {0,0,0,1,0, 1,0,0,0,1, 0,0,1,0,1, 1,0,0,0,1,0, 0,0,1,0}; // int BigStar[] = {0,1,0,0,1,0,0,1,1,0,1,1,1,1,0,0,,1,1,0,0,1,0,0,1}; //-------------------------------------------------------------------------------------- // Define variables int letterSpace; int dotTime; //-------------------------------------------------------------------------------------- void setup() { // setting the ports of the leds to OUTPUT pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); // defining the space between the letters (ms) letterSpace = 6; // defining the time dots appear (ms) dotTime = 3; // testing all 5 leds are working, they will glow from top to buttom int counter; for (counter=2; counter < 7; counter++) { digitalWrite(counter, HIGH); // delay for 300 ms delay (300); digitalWrite(counter, LOW); } } //-------------------------------------------------------------------------------------- // Print letters with 4 columns void printLetter(int letter[]) { int y; int x; // Printing x columns and y rows for (x=0; x<4; x++) { for (y=0; y<5; y++) { digitalWrite(y+2, letter[y+(x*5)]); } delay(dotTime); } // printing the space between the letters for (y=0; y<5; y++) { digitalWrite(y+2, 0); } delay(letterSpace); } //-------------------------------------------------------------------------------------- // Printer letters M and W void printLetterMW(int letter[]) { int y; int x; // Printing x columns and y rows for (x=0; x<5; x++) { for (y=0; y<5; y++) { digitalWrite(y+2, letter[y+(x*5)]); } delay(dotTime); } // printing the space between the letters for (y=0; y<5; y++) { digitalWrite(y+2, 0); } delay(letterSpace); } //-------------------------------------------------------------------------------------- // This makes it go in loop void loop() { // Printing Gautam // printLetter(BigG); printLetter(BigA); printLetterMW(BigM); printLetter(BigI); printLetter(BigT); // printLetter(SmallU); // printLetter(SmallT); // printLetter(SmallA); // printLetterMW(SmallM); // printLetter(ZSPACE); // printLetterMW(BigSmile); // printLetterMW(BigStar); printLetter(ZSPACE); } //--------------------------------------------------------------------------------------