hi...
my project is scrolling and static message displayed on dmd p10 module(32x16) using arduino mega2560.
i have use -arduino mega 2560
-p10 module(32x16) = 10
-font 5x7
i have arrange two line each of 5 p10 module(32x16) & use 5x7 font so,
total 4-line.Each line 26 characters.
i want first 3-line static message and last line scrolling message.
In this project i have done static message part.
my code is
/read serial data and displayed on dmd display/
#include <DMD.h>
#include <SPI.h>
#include <TimerOne.h>
#include "SystemFont5x7.h"
#include "Arial_black_16.h"
#define DISPLAYS_ACROSS 10
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
const int SerialBufferSize = 104;
char serIn[SerialBufferSize+1];
void ScanDMD()
{
dmd.scanDisplayBySPI();
}
void setup()
{
Timer1.initialize( 5000 );
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 < SerialBufferSize)
{
serIn[chars_in] = Serial.read();
Serial.write( byte(serIn[chars_in]));
chars_in++;
}
}
dmd.selectFont(SystemFont5x7);
dmd.drawString(0, 0, serIn,26, GRAPHICS_NORMAL );
dmd.drawString(0, 8, serIn+26,26,GRAPHICS_NORMAL);
dmd.drawString(160, 0, serIn+52, 26, GRAPHICS_NORMAL );
dmd.drawString(160, 8, serIn+78, 26, GRAPHICS_NORMAL );
delay(1000);
my question is how to scroll message on last line,please help and send the code for it.