Hi
Could anyone help me overpass that issue?
I have 6 p10 led panels 16x32. I have make a 96x32 matrix. I m using the dmd master library from here GitHub - freetronics/DMD: Arduino library to support the Freetronics Dot Matrix Display All i want to do is send strings via my visual basic program and see them in my matrix. My code works perfect when i try to do that on 96x16 set up. When i change my code to 96x32 (define DISPLAYS_DOWN 1 to 2) labels appears in my matrix but not properly.
here is my arduino code
#include <SPI.h> //SPI.h must be included as DMD is written by SPI (the IDE complains otherwise)
#include <DMD.h> //
#include <TimerOne.h> //
#include "SystemFont5x7.h"
char stringa[20];
int i = 0;
//Fire up the DMD library as dmd
#define DISPLAYS_ACROSS 3
#define DISPLAYS_DOWN 1
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
void ScanDMD()
{
dmd.scanDisplayBySPI();
}
void setup(void)
{
//initialize TimerOne's interrupt/CPU usage used to scan and refresh the display
Timer1.initialize( 500 ); //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.selectFont(SystemFont5x7);
//clear/init the DMD pixels held in RAM
dmd.clearScreen( true ); //true is normal (all pixels off), false is negative (all pixels on)
Serial.begin(57600);
}
void loop(void)
{
// Read line from Serial
memset(stringa, 0, sizeof(stringa)); // set string contents to zero
Serial.setTimeout(100); // second input timeout
i = Serial.readBytesUntil('\n', stringa, sizeof(stringa)-1); // Read line of input
if(i > 0) { // Display line if anything was read
Serial.println(stringa);
dmd.clearScreen(true);
dmd.drawString( 0, 0, stringa , strlen(stringa), GRAPHICS_NORMAL );
}
}
and the visual basic code
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
If SerialPort3.IsOpen Then
SerialPort3.Write(Label20.Text & " " & Label1.Text & " " & Label3.Text)
End If
end sub