Example 4 – Single line and double line scrolling text

/*This example illustrates two user funcions of LedP10 library
First function-showmsg_single_scroll is for scroling of single message on P10 panel with 4 arguments which are message, no. of times of message scrolling, speed and font.
for message, pointer to a character string can be passed. For continuously running the message, INF can be passed in second argument, speed can be in range of 0-30, and font can be 0 or 1 as two type of fonts are currently supported for full screen messages.
For second function-showmsg_double_scroll, there would be 7 arguments, 2 for messages, two for no. of times of message scrolling, two for speed, and last one for font.
Specification being same as for single scrolling function, except only one font id provided for double scrolling and it's value should be 0.*/
#include "TimerOne.h"
#include "SPI.h"
#include "ledP10.h"
LedP10 myled;
void setup()
{
myled.init(3,4,8,9,5);
/*
P10 Select Line A - Arduino Pin 3
P10 Select Line B - Arduino Pin 4
P10 Store Line - Arduino Pin 8
P10 OE Line - Arduino Pin 9
No. of Panels - 5 (Can be up to 10)
*/
myled.showmsg_single_scroll("this is single led test",2,3,0);
delay(6000);
myled.showmsg_double_scroll("this is double led test1","this is double led test2",10,INF,3,1,0);
}
void loop()
{
}

Example 5 – Brightness control

/*This example is to illustrate the use of the functon &lt;setbrightness(uint8_t brightness)&gt;, this function takes one argument of type uint8_t, it's value can be from 0 to 255, 255 being highest brightness and 0 is lowest.
this function can be called anytime after or before calling any other function of LedP10 library.
In this example brightness reduces when counter 'num1' reaches value of 50.
*/
#include "TimerOne.h"
#include "SPI.h"
#include "ledP10.h"
int num1=0;
LedP10 myled;
void setup()
{
myled.init(3,4,8,9 ,1);
}
void loop()
{
if(num1==50)
{
myled.setbrightness(50);
}
myled.showmsg_single_static(num1,0);
num1+=1;
delay(500);
}

Comment below to report any issues and bugs related to this Arduino library.

I think your library is very good. I have doubts:
* Why Led Display controller Card (the red PCB) is required?
* Does Arduino UNO replaces the controller card?
* I understand that 3 components are required: (1) Power Supply, (2) Arduino UNO and (3) the Led panel. Is that right?
* Is the wiring between Arduino and Panel?

static_double_example:12: error: ‘LedP10′ does not name a type
static_double_example.ino: In function ‘void setup()’:
static_double_example:16: error: ‘myled’ was not declared in this scope
static_double_example.ino: In function ‘void loop()’:
static_double_example:21: error: ‘myled’ was not declared in this scope

Great instructions, very clear and easy to follow.
I downloaded the library and connected as suggested. The problem is that I am getting random dots on the DMD instead of the text message.
Please note that I tried with another display driver board (the BX-5T) and the display is working properly so what could be the problem?
Can you please help. I am using Arduino pro mini board and a generic P10 16×32 red display module.
Thanks and regards