void display_pattern(int loops)//int loop acts like a delay, it take 8 mSecands to scan all of the rows so int loops = 15 is a good time for it{ for(x=0;x<numPatterns-1;x++){ // loop over the patterns for (int z=0;z<8;z++){ //scrolls one bite at a time for(int t=0;t<loops;t++){// the delay we get with loops for(y=0;y<10;y++){// loops over the array of bytes byte temp = patterns[x][y]; byte temp_2=patterns[x+1][y]; digitalWrite(LatchPin, 0); shiftOut(DataPin, ClockPin,MSBFIRST,((temp<<z)+(temp_2>>7-z)));//writes digital outputs, Z is for how much bites it need to scroll digitalWrite(LatchPin, 1); delayMicroseconds(800); digitalWrite(LatchPin, 0); shiftOut(DataPin, ClockPin,MSBFIRST,0); digitalWrite(LatchPin, 1); digitalWrite(clock,HIGH); digitalWrite(clock,LOW); } } }}}

Ok, and you want to move the bytes down the page now, vs across the page.You need to flip your loop around so that happens, and rotate the pattern with it.

Try this:make z go up 10make y go up to 8swap x & y in these two

byte temp = patterns [ x ] [ y ]; byte temp_2=patterns [ x+1 ] [ y ];

What you to end up with is writing a byte (which you need as the vertical column of a letter now vs the horizontal row)to the shift register, make it show with a low bit from the 4017, turn it off, put out the next column and make it show with the next bit low from the 4017, ...

Has anyone worked with a DS1307 RTC before? I would also like to scroll the time with the temp and add some buttons to fix the time so a computer is not needed. How can I add a clock code to the code i have? Can this easily be done?

sorry that image was so big. Your idea worked though, I didn't allow for the 2 digits. I did change the temp to 2 digits because the display always had a "0" before the 2 digit temp. I can now display the "degrees F." So, I'm understanding better now. Thanks guys

Your idea worked though, I didn't allow for the 2 digits. I did change the temp to 2 digits because the display always had a "0" before the 2 digit temp. I can now display the "degrees F." So, I'm understanding better now. Thanks guys

Ok, and you want to move the bytes down the page now, vs across the page.You need to flip your loop around so that happens, and rotate the pattern with it.

Try this:make z go up 10make y go up to 8swap x & y in these two

byte temp = patterns [ x ] [ y ]; byte temp_2=patterns [ x+1 ] [ y ];

What you to end up with is writing a byte (which you need as the vertical column of a letter now vs the horizontal row)to the shift register, make it show with a low bit from the 4017, turn it off, put out the next column and make it show with the next bit low from the 4017, ...

Ok, If I'm doing what you said right it's not working. It makes the leds flash very fast with no discernible pattern. I'll show the code to make sure. And thanks for the word on the RTC. And thanks Nick, I'll try that change.

void display_pattern(int loops)//int loop acts like a delay, it take 8 mSecands to scan all of the rows so int loops = 15 is a good time for it{ for(x=0;x<numPatterns-1;x++){ // loop over the patterns for (int z=0;z<10;z++){ //scrolls one bite at a time for(int t=0;t<loops;t++){// the delay we get with loops for(y=0;y<8;y++){// loops over the array of bytes byte temp = patterns[y][x]; byte temp_2=patterns[y+1][x]; digitalWrite(LatchPin, 0); shiftOut(DataPin, ClockPin,MSBFIRST,((temp<<z)+(temp_2>>7-z)));//writes digital outputs, Z is for how much bites it need to scroll digitalWrite(LatchPin, 1); delayMicroseconds(800); digitalWrite(LatchPin, 0); shiftOut(DataPin, ClockPin,MSBFIRST,0); digitalWrite(LatchPin, 1); digitalWrite(clock,HIGH); digitalWrite(clock,LOW); } } }}}

1. i have a 8x10 matrix and the words scroll across the rows (8 wide). I want to have the matrix on its side (10x8) How do I change the code to make the words (temp) scroll across the long ways (10 wide)?

Can't you turn it sideways? Seriously.

I see from the video that it only appears to use 8 out of the 10 pixels anyway. Apart from turning it 90 degrees, having it scroll the other way is basically just going to give you two more pixels (each pixel will be on for 10 positions rather than .

I'm not sure you can easily do it otherwise. A bit more reading of the circuit indicates it is using a decade counter (hence the 10 rows) and a shift register (hence the 8 columns). I suppose it could be done but I can't quite get my head around it right now, and without the hardware to hand, any suggestions I make might be plain wrong.

Although, thinking about it, I think CrossRoads is probably right. The scrolling is really just an artifact of the way the loops are constructed. The thing is basically a multiplexed display, effectively displaying an 8 x 10 matrix of bits, the matrix changing every 15 loops (hence the scroll).

Even without rewriting the font definitions, you should be able to take what it is doing now, and shifting that into 10 bytes (ie. 80 bits) of an array. Then just read the array back "the other way". Something like that anyway.

Please post technical questions on the forum, not by personal message. Thanks!

1. I made this so it can scroll the temperature across the matrix but I would like the time also. I have attached a DS1307. The SDA pin is attached to analog pin 4, and the SCL pin is attached to analog pin 5, the battery is on the back. Can someone either add the time code for me or tell me exactly how to do it? I have not worked with a RTC before but I'm told that it's easy. I would like to to scroll the temp followed by the time.

2. As I scroll the temperature across the matrix it is always proceeded with a lit LED on the top row. I can not figure out why and how to get rid of it. Any ideas? I have added a pic.

void display_pattern(int loops)//int loop acts like a delay, it take 8 mSecands to scan all of the rows so int loops = 15 is a good time for it{ for(x=0;x<numPatterns-1;x++){ // loop over the patterns for (int z=0;z<8;z++){ //scrolls one bite at a time for(int t=0;t<loops;t++){// the delay we get with loops for(y=0;y<10;y++){// loops over the array of bytes byte temp = patterns[x][y]; byte temp_2=patterns[x+1][y]; digitalWrite(LatchPin, 0); shiftOut(DataPin, ClockPin,MSBFIRST,((temp<<z)+(temp_2>>7-z)));//writes digital outputs, Z is for how much bites it need to scroll digitalWrite(LatchPin, 1); delayMicroseconds(800); digitalWrite(LatchPin, 0); shiftOut(DataPin, ClockPin,MSBFIRST,0); digitalWrite(LatchPin, 1); digitalWrite(clock,HIGH); digitalWrite(clock,LOW); } } }}}

Thanks, I'll give it a try and i was missing the 10K pull-ups. If I can get this to work i may need help incorporating it into the code I already have. I'll try it out and post how it goes. Thanks, for your time. And do you have any idea how to get rid of that lit LED that always goes before the temp in the display?