Page 1 of 1

direction of scrolling text

Posted: Fri Jan 31, 2014 11:58 am
by blaster
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 :)

Re: direction of scrolling text

Posted: Mon Feb 03, 2014 1:29 am
by Brissieboy
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.

Re: direction of scrolling text

Posted: Mon Feb 03, 2014 10:28 am
by blaster
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