direction of scrolling text

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
Post Reply
blaster
Posts: 3
Joined: Fri Jan 31, 2014 11:51 am

direction of scrolling text

Post by blaster » Fri Jan 31, 2014 11:58 am

Hello guys,

i'd like to edit the direction of scrolling text, is from right to left now. I want from left to right.

It's possible edit it?


Very thanks
ps. sorry for my bad english :)

Brissieboy
Posts: 98
Joined: Fri Sep 20, 2013 7:25 am

Re: direction of scrolling text

Post by Brissieboy » Mon Feb 03, 2014 1:29 am

Hi blaster,

The DMD library available at https://github.com/cjd/DMD has this feature built in.

dmd.stepMarquee(int amountX, int amountY) is used in the sketch loop to step the scrolling display.
using -1 for "amountX" (and 0 for amountY) scrolls right to left,
using +1 for "amountX" scrolls left to right.

blaster
Posts: 3
Joined: Fri Jan 31, 2014 11:51 am

Re: direction of scrolling text

Post by blaster » Mon Feb 03, 2014 10:28 am

Brissieboy wrote:Hi blaster,

The DMD library available at https://github.com/cjd/DMD has this feature built in.

dmd.stepMarquee(int amountX, int amountY) is used in the sketch loop to step the scrolling display.
using -1 for "amountX" (and 0 for amountY) scrolls right to left,
using +1 for "amountX" scrolls left to right.
hello,
yes, i know that there is dmd.stepMarquee. But the problem is when i go to edit amountX from -1 to +1. i can't view the text. Why? where is my error?


Very thanks

void drawText(String dispString)
{
dmd.clearScreen( true );
dmd.selectFont( Arial_14 );
char newString[256];
int sLength = dispString.length();
dispString.toCharArray( newString, sLength+1 );
dmd.drawMarquee(newString,sLength,( 32*DISPLAYS_ACROSS )-1 , 0 );
long start=millis();
long timer=start;
long timer2=start;
boolean ret=false;
while(!ret){
if ( ( timer+22 ) < millis() ) {
ret=dmd.stepMarquee( -1, 0 );
timer=millis();
}
}



Hello,
I solved the problem
error is in "dmd.drawMarquee(newString,sLength,0 , 0 );"


thanks

Post Reply