const int latchPin = 8;//Pin connected to ST_CP of 74HC595 const int clockPin = 12;//connected to SH_CP const int dataPin = 11; //connected to DS int tt = 0; int data1[] ={0xFF, 0xC7,0x83,0x81,0xC0,0x81,0x83,0xC7, //red heart 0xFF,0xFF, // " " 0xC7,0xBB,0xBD,0xDE,0xBD,0xBB,0xC7, //empty heart 0xFF,0xFF, // " " 0xFF,0xFF, // " " 0xFF,0xFF, // " " 0xFF,0xFF, // " " 0xBD,0x81,0xBD, // "I" 0xFF,0xFF, // " " 0xC7,0x83,0x81,0xC0,0x81,0x83,0xC7, //red heart 0xFF,0xFF, // " " 0x81,0xFD,0xFD,0x81, // "U" 0xFF,0xFF, // " " 0xFF, // " " 0xFF }; // End. int data2[] ={0xFF, 0xC7,0xBB,0xBD,0xDE,0xBD,0xBB,0xC7, //empty heart 0xFF,0xFF, /* " " */ 0xC7,0x83,0x81,0xC0,0x81,0x83,0xC7, //red heart 0xFF,0xFF, /* " " */ 0xFF,0xFF, /* " " */ 0xFF,0xFF, // " " 0xFF,0xFF, // " " 0xBD,0x81,0xBD, // "I" 0xFF,0xFF, // " " 0xC7,0x83,0x81,0xC0,0x81,0x83,0xC7, //red heart 0xFF,0xFF, // " " 0x81,0xFD,0xFD,0x81, // "U" 0xFF,0xFF, // " " 0xFF, // " " 0xFF }; // End. void setup () { //set pins to output pinMode(latchPin,OUTPUT); pinMode(clockPin,OUTPUT); pinMode(dataPin,OUTPUT); } void loop() { for(int n = 0; n < 42; n++) { for(int t = 0;t < 20; t++) { delay(1); int dat = 0x100; for(int num = n; num < 8 + n; num++) { //shift to simulate right to left scrolling dat = dat>>1; shiftOut(dataPin,clockPin,MSBFIRST,~data1[num]); shiftOut(dataPin,clockPin,MSBFIRST,~dat); digitalWrite(latchPin,HIGH); delay (2); //ground latchPin and hold low //for as long as you are transmitting digitalWrite(latchPin,LOW);} } delay (5); for(int t = 0;t < (10+tt); t++ ) { delay(1); int dat = 0x100; for(int num = n; num < 8 + n; num++) { //shift to simulate right to left scrolling dat = dat>>1; shiftOut(dataPin,clockPin,MSBFIRST,~data2[num]); shiftOut(dataPin,clockPin,MSBFIRST,~dat); digitalWrite(latchPin,HIGH); if (n==88) { delay(3); } else { delay (2); } //ground latchPin and hold low //for as long as you are transmitting digitalWrite(latchPin,LOW);} } delay(5); } }