How to scroll text in 8*8 led display

Circuit Diagram

Code

// made by Siddharth haldkar

#define ROW_1 2

#define ROW_2 3

#define ROW_3 4

#define ROW_4 5

#define ROW_5 6

#define ROW_6 7

#define ROW_7 8

#define ROW_8 9

#define COL_1 10

#define COL_2 11

#define COL_3 12

#define COL_4 13

#define COL_5 A0

#define COL_6 A1

#define COL_7 A2

#define COL_8 A3

const byte rows[] = {

ROW_1, ROW_2, ROW_3, ROW_4, ROW_5, ROW_6, ROW_7, ROW_8

};

byte A[] = {B00011000,B00111100,B01100110,B01100110,B01111110,B01111110,B01100110,B01100110};

byte B[] = {B01111100,B01100110,B01100110,B01111100,B01111110,B01100110,B01100110,B01111100};

byte C[] = {B00111110,B01111110,B01100000,B01100000,B01100000,B01100000,B01111110,B00111110};

byte D[] = {B01111000,B01111100,B01100110,B01100110,B01100110,B01100110,B01111100,B01111000};

byte E[] = {B01111110,B01111110,B01100000,B01111110,B01111110,B01100000,B01111110,B01111110};

byte F[] = {B01111110,B01111110,B01100000,B01111100,B01111100,B01100000,B01100000,B01100000};

byte G[] = {B00111000,B01111100,B01100100,B01100000,B01101110,B01100100,B01111100,B00111000};

byte H[] = {B01100110,B01100110,B01100110,B01111110,B01111110,B01100110,B01100110,B01100110};

byte I[] = {B01111110,B01111110,B00011000,B00011000,B00011000,B00011000,B01111110,B01111110};

byte J[] = {B01111110,B01111110,B00011000,B00011000,B00011000,B00011000,B01111000,B01110000};

byte K[] = {B01100110,B01101100,B01111000,B01110000,B01110000,B01111000,B01101100,B01100110};

byte L[] = {B01100000,B01100000,B01100000,B01100000,B01100000,B01100000,B01111110,B01111110};

byte M[] = {B01000010,B01100110,B01111110,B01011010,B01000010,B01000010,B01000010,B01000010};

byte N[] = {B01000110,B01100110,B01100110,B01110110,B01111110,B01101110,B01100110,B01100110};

byte O[] = {B00111100,B01111110,B01100110,B01100110,B01100110,B01100110,B01111110,B00111100};

byte P[] = {B01111000,B01111100,B01100110,B01100110,B01111100,B01111000,B01100000,B01100000};

byte Q[] = {B00111100,B01000010,B01000010,B01000010,B01000010,B01001010,B00111100,B00000010};

byte R[] = {B01111100,B01100110,B01100110,B01101100,B01111000,B01111000,B01101100,B01100110};

byte S[] = {B00111100,B01111110,B01100000,B01111100,B00111110,B00000110,B01111110,B00111100};//{B00111000,B01111100,B01100000,B00110000,B00011000,B00001100,B00111100,B01111000};

byte T[] = {B01111110,B01111110,B00011000,B00011000,B00011000,B00011000,B00011000,B00011000};

byte U[] = {B01100110,B01100110,B01100110,B01100110,B01100110,B01100110,B01111110,B00111100};

byte V[] = {B01100110,B01100110,B01100110,B01100110,B01100110,B01100110,B00111100,B00011000};

byte W[] = {B01000010,B01000010,B01000010,B01000010,B01000010,B01011010,B01011010,B00100100};

byte X[] = {B01100110,B01100110,B01100110,B00111100,B00011000,B00111100,B01100110,B01100110};

byte Y[] = {B01100110,B01100110,B01100110,B01111110,B00111100,B00011000,B00011000,B00011000};

byte Z[] = {B01111110,B01111110,B00000110,B00001100,B00011000,B00110000,B01111110,B01111110};

byte Zero[] = {B00111100,B01111110,B01100110,B01100110,B01100110,B01100110,B01111110,B00111100};

byte One[] = {B00011000,B00111100,B01100110,B01100110,B01111110,B01111110,B01100110,B01100110};

byte Two[] = {B00110000,B01111000,B11001100,B11001101,B11111101,B11111101,B11001101,B11001101};

byte Three[] = {B01100000,B11110000,B10011000,B10011010,B11111011,B11111010,B10011010,B10011010};

byte Four[] = {B11000000,B11100000,B00110000,B00110101,B11110110,B11110100,B00110100,B00110100};

byte Five[] = {B10000000,B11000000,B01100000,B01101010,B11101101,B11101000,B01101000,B01101000};

byte Six[] = {B00000000,B10000000,B11000000,B11010100,B11011010,B11010000,B11010000,B11010000};

byte Seven[] = {B00000000,B00000000,B10000000,B10101000,B10110100,B10100001,B10100001,B10100001};

byte Eight[] = {B00000000,
B00000000,
B00000000,
B01010000,
B01101001,
B01000010,
B01000010,
B01000001};

byte Nine[] = {B00000000,B00000000,B00000000,B10100000,B11010011,B10000100,B10000100,B10000011};

byte Ten[] = {B00000001,B00000001,B00000001,B01000001,B10100111,B00001001,B00001001,B00000111};

byte Eleven[] = {B00000010,B00000010,B00000010,B10000010,B01001110,B00010010,B00010010,B00001110};

byte Twelve[] = {B00000100,B00000100,B00000100,B00000100,B10011101,B00100101,B00100101,B00011100};

byte Thirteen[] = {B00001000,B00001000,B00001000,B00001010,B00111010,B01001010,B01001010,B00111001};

byte Fourteen[] = {B00010000,B00010000,B00010000,B00010100,B01110100,B10010100,B10010100,B01110011};

byte Fifteen[] = {B00100000,B00100000,B00100000,B00101001,B11101001,B00101001,B00101001,B11100110};

byte Sixteen[] = {B01000000,B01000000,B01000000,B01010010,B11010010,B01010010,B01010010,B11001101};

byte Seventeen[] = {B10000000,B10000000,B10000000,B10100100,B10100100,B10100100,B10100100,B10011010};

byte Eighteen[] = {B00000000,B00000001,B00000000,B01001001,B01001001,B01001001,B01001001,B00110101};

byte Nineteen[] = {B00000000,B00000010,B00000000,B10010010,B10010010,B10010010,B10010010,B01101010};

byte Twenty[] = {B00000000,B00000100,B00000000,B00100101,B00100101,B00100101,B00100101,B11010101};

byte Twentyone[] = {B00000000,B00001000,B00000010,B01001011,B01001010,B01001010,B01001010,B10101010};

byte Twentytwo[] = {B00000000,B00010000,B00000100,B10010111,B10010100,B10010100,B10010100,B01010100};

byte Twentythree[] = {B00000000,B00100000,B00001000,B00101110,B00101001,B00101001,B00101001,B10101001};

byte Twentyfour[] = {B00000000,B01000000,B00010000,B01011100,B01010010,B01010010,B01010010,B01010010};

byte Twentyfive[] = {B00000000,B10000000,B00100000,B10111000,B10100101,B10100101,B10100100,B10100100};

byte Twentysix[] = {B00000000,B00000000,B01000000,B01110001,B01001010,B01001010,B01001010,B01001001};

byte Twentyseven[] = {B00000000,B00000000,B10000000,B11100011,B10010100,B10010100,B10010100,B10010011};

byte Twentyeight[] = {B00000000,B00000000,B00000000,B11000110,B00101001,B00101001,B00101001,B00100110};

byte Twentynine[] = {B00000000,B00000000,B00000000,B10001100,B01010010,B01010010,B01010010,B01001100};

byte Thirty[] = {B00000000,B00000000,B00000000,B00011000,B10100100,B10100100,B10100100,B10011000};

byte Thirtyone[] = {B00000000,B00000000,B00000000,B11000110,B00101001,B00101001,B00101001,B00100110};

byte Thirtytwo[] = {B00000000,B00000000,B00000000,B11000110,B00101001,B00101001,B00101001,B00100110};

byte Thirtytthree[] = {B00000000,B00000000,B00000000,B11000110,B00101001,B00101001,B00101001,B00100110};

byte Thirtyfour[] = {B00000000,B00000000,B00000000,B11000110,B00101001,B00101001,B00101001,B00100110};

void setColumns(byte b) {

digitalWrite(COL_1, (~b >> 0) & 0x01); // Get the 1st bit: 10000000

digitalWrite(COL_2, (~b >> 1) & 0x01);

digitalWrite(COL_3, (~b >> 2) & 0x01); // Get the 3rd bit: 00100000

digitalWrite(COL_4, (~b >> 3) & 0x01); // Get the 4th bit: 00010000

digitalWrite(COL_5, (~b >> 4) & 0x01); // Get the 5th bit: 00001000

digitalWrite(COL_6, (~b >> 5) & 0x01); // Get the 6th bit: 00000100

digitalWrite(COL_7, (~b >> 6) & 0x01); // Get the 7th bit: 00000010

digitalWrite(COL_8, (~b >> 7) & 0x01); // Get the 8th bit: 00000001

}

void drawScreen(byte buffer2[]){

for (byte i = 0; i < 8; i++) {

setColumns(buffer2[i]); // Set columns for this specific row

digitalWrite(rows[i], HIGH);

delay(2); // Set this to 50 or 100 if you want to see the multiplexing effect!

digitalWrite(rows[i], LOW);

}

}

float timeCount = 0;

void setup() {

// Serial.begin(9600);

for (byte i = 2; i <= 13; i++)

pinMode(i, OUTPUT);

pinMode(A0, OUTPUT);

pinMode(A1, OUTPUT);

pinMode(A2, OUTPUT);

pinMode(A3, OUTPUT);

}

void loop()

{

timeCount += 1;

if(timeCount < 40) {
drawScreen(One);
} else if (timeCount < 80) {
drawScreen(Two);
} else if (timeCount < 120) {
drawScreen(Three);
} else if (timeCount < 160) {
drawScreen(Four);

} else if (timeCount < 200) {
drawScreen(Five);

} else if (timeCount < 240) {
drawScreen(Six);
} else if (timeCount < 280) {
drawScreen(Seven);
} else if (timeCount < 320) {
drawScreen(Eight);
} else if (timeCount < 360) {
drawScreen(Nine);
} else if (timeCount < 400) {
drawScreen(Ten);
} else if (timeCount < 440) {
drawScreen(Eleven);
} else if (timeCount < 480) {
drawScreen(Twelve);
} else if (timeCount < 520) {
drawScreen(Thirteen);
} else if (timeCount < 560) {
drawScreen(Fourteen);
} else if (timeCount < 600) {
drawScreen(Fifteen);
} else if (timeCount < 640) {
drawScreen(Sixteen);
} else if (timeCount < 680) {
drawScreen(Seventeen);
} else if (timeCount < 720) {
drawScreen(Eighteen);
} else if (timeCount < 760) {
drawScreen(Nineteen);
} else if (timeCount < 800) {
drawScreen(Twenty);
} else if (timeCount < 840) {
drawScreen(Twentyone);
} else if (timeCount < 880) {
drawScreen(Twentytwo);
} else if (timeCount < 920) {
drawScreen(Twentytwo);
} else if (timeCount < 960) {
drawScreen(Twentythree);
} else if (timeCount < 1000) {
drawScreen(Twentyfour);
} else if (timeCount < 1040) {
drawScreen(Twentyfive);
} else if (timeCount < 1080) {
drawScreen(Twentysix);
} else if (timeCount < 1120) {
drawScreen(Twentyseven);
} else if (timeCount < 1160) {
drawScreen(Twentynine);
} else if (timeCount < 1200) {
drawScreen(Thirty);

} else if (timeCount < 1200) {
} else {

// back to the start
timeCount = 0; }

}

OMR sheet

For example

If you have any doubt you can ask in the comment box


I hope this will help you.

We also make school project for exhibition



contact us email id -siddhu9425@gmail.com

Jabalpur, Madhya Pradesh India

Related project———-

Design a site like this with WordPress.com
Get started