DMD set up

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
Post Reply
EscapeMky
Posts: 1
Joined: Mon Aug 26, 2019 3:36 am

DMD set up

Post by EscapeMky » Mon Aug 26, 2019 3:52 am

Hi All, I am new to this so need some assistance please.

Just trying to get some static text onto a DMD. Have the following in the sketch -

#include "SPI.h"
#include "DMD.h"
#include "TimerOne.h"
#include "Arial_black_16.h"<arial_black_16.h>
// you can remove the fonts if unused
#include "SystemFont5x7.h"
#define DISPLAYS_ACROSS 1
#define DISPLAYS_DOWN 1
/* change these values if you have more than one DMD connected */
DMD dmd(DISPLAYS_ACROSS,DISPLAYS_DOWN);

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

void setup()
{
Timer1.initialize( 5000 );
/*period in microseconds to call ScanDMD. Anything longer than 5000 (5ms) and you can see flicker.*/

Timer1.attachInterrupt( ScanDMD );
/*attach the Timer1 interrupt to ScanDMD which goes to dmd.scanDisplayBySPI()*/

dmd.clearScreen( true );
/* true is normal (all pixels off), false is negative (all pixels on) */

dmd.clearScreen( true);
dmd.selectFont( SystemFont5x7 );
}void setup() {
dmd.drawChar( 5, 5, ‘BHAAL', GRAPHICS_NORMAL ); // put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

Getting the following error, where to now?

WARNING: Category '' in library SparkIntervalTimer is not valid. Setting to 'Uncategorized'
In file included from C:\Users\nebo\Documents\Arduino\BHAAL_4\BHAAL_4.ino:2:0:

C:\Users\nebo\Documents\Arduino\libraries\DMD/DMD.h:52:2: warning: #warning CHANGE THESE TO SEMI-ADJUSTABLE PIN DEFS! [-Wcpp]

#warning CHANGE THESE TO SEMI-ADJUSTABLE PIN DEFS!

^

C:\Users\nebo\Documents\Arduino\BHAAL_4\BHAAL_4.ino:4:28: warning: extra tokens at end of #include directive

#include "Arial_black_16.h"<arial_black_16.h>

^

BHAAL_4:31:1: error: stray '\342' in program

dmd.drawChar( 5, 5, ‘BHAAL', GRAPHICS_NORMAL ); // put your setup code here, to run once:

^

BHAAL_4:31:1: error: stray '\200' in program

BHAAL_4:31:1: error: stray '\230' in program

C:\Users\nebo\Documents\Arduino\BHAAL_4\BHAAL_4.ino:31:31: warning: missing terminating ' character

dmd.drawChar( 5, 5, ‘BHAAL', GRAPHICS_NORMAL ); // put your setup code here, to run once:

^

BHAAL_4:31:1: error: missing terminating ' character

dmd.drawChar( 5, 5, ‘BHAAL', GRAPHICS_NORMAL ); // put your setup code here, to run once:

^

C:\Users\nebo\Documents\Arduino\BHAAL_4\BHAAL_4.ino: In function 'void setup()':

BHAAL_4:30:7: error: redefinition of 'void setup()'

}void setup() {

^

C:\Users\nebo\Documents\Arduino\BHAAL_4\BHAAL_4.ino:17:6: note: 'void setup()' previously defined here

void setup()

^

BHAAL_4:31:26: error: 'BHAAL' was not declared in this scope

dmd.drawChar( 5, 5, ‘BHAAL', GRAPHICS_NORMAL ); // put your setup code here, to run once:

^

Multiple libraries were found for "TimerOne.h"
Used: C:\Users\nebo\Documents\Arduino\libraries\TimerOne
Not used: C:\Program Files (x86)\Arduino\libraries\TimerOne
exit status 1
stray '\342' in program

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

Re: DMD set up

Post by Brissieboy » Mon Aug 26, 2019 7:20 am

Two obvious things (without actually trying to compile your code):
1. Why do you have setup() repeated at line 30? Need to delete this entire line.
2. At line 31 drawChar() is looking for a character so ‘BHAAL' is incorrect. Maybe you mean dmd.drawString() with ‘BHAAL' replaced with "BHAAL".
Try that and see how you go.
And please put your code in the '</>' holders so it displays correctly.
Using the IDE's Auto Format under the Tools menu will give you a consistent layout improving readability.
You can use '//' for a single line comment (no need for the /* */ pair unless multiple lines.

Post Reply