text_scrolling

hi…

i have try to start scrolling message and stop scrolling message.

i have use arduino uno card and p10 module (32x16)

font 5x7
p10 module(32x16) - 04

i have arrange two lines of 5x7 font

my question is that how first line static message and only 2nd line scrolling (font 5x7)

my code is below ,in that i have done static msg and also scrolling but when scrolling 2nd line then all msg (also static msg) are scrolled,so how to solve these problem.

in short, how to stop scrolling msg?

#include <DMD.h>
#include <SPI.h>
#include <TimerOne.h>
#include “SystemFont5x7.h”
#include “Arial_black_16.h”
#define DISPLAYS_ACROSS 4
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);

char serIn[45];

void ScanDMD()
{
dmd.scanDisplayBySPI();
}

void setup()
{

Timer1.initialize( 1000 );
Timer1.attachInterrupt( ScanDMD );
dmd.clearScreen( true );

Serial.begin(9600);

}

void loop()
{

if(Serial.available()) {
int chars_in = 0;
// void serialFlush(){
while (Serial.available()>0 && chars_in<42){
serIn[chars_in] = Serial.read();
Serial.write( byte(serIn[chars_in]));
chars_in++;
}

serIn[chars_in+1] = ‘\0’;

}

//dmd.clearScreen( true );
// dmd.selectFont(Arial_Black_16);
dmd.selectFont(SystemFont5x7);

dmd.drawString(0, 0, serIn, 21, GRAPHICS_NORMAL );

//dmd.drawString(0, 8, serIn+21, 21, GRAPHICS_NORMAL );

delay(10000);

//dmd.clearScreen( true );

// THE FIRST MESSAGE - SCROLLING
// Select the font. Both fonts included here. Just comment out one of them
dmd.selectFont(System5x7);
dmd.drawString(0, 8, serIn+21,21, GRAPHICS_NORMAL );

long start=millis();
long timer=start;
boolean ret=false;
while(!ret){
if ((timer+1) < millis()) {
ret=dmd.stepMarquee(-1,0);
timer=millis();
}
}
}

Thank u in advance…

my question is that how first line static message and only 2nd line scrolling (font 5x7)

Write your own code to do the scrolling. rite your own code to do the scrolling. W ite your own code to do the scrolling. Wr te your own code to do the scrolling. Wri e your own code to do the scrolling. Writ your own code to do the scrolling. Write your own code to do the scrolling. Write our own code to do the scrolling. Write y

in short, how to stop scrolling msg?

That seems pretty obvious. Stop calling stepMarquee().

16 posts and you still don't know how to use code tags? Please read the four posts at the top of this Forum and learn how to use code tags.