Any ideal about controlling 2 individual dmd with 2 activity by 1 arduino ?

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
Post Reply
QuanNguyen
Posts: 3
Joined: Fri Apr 22, 2016 5:49 am

Any ideal about controlling 2 individual dmd with 2 activity by 1 arduino ?

Post by QuanNguyen » Fri Apr 22, 2016 6:03 am

I want 1 dmd show my text and 1 dmd show time , all are controlled by 1 arduino , how i should do ? i don't know how to control pixel in multiple dmd

User avatar
stryker
Posts: 282
Joined: Sat Jan 14, 2012 2:44 pm

Re: Any ideal about controlling 2 individual dmd with 2 activity by 1 arduino ?

Post by stryker » Fri Apr 22, 2016 7:02 am

Hi,

This is simple enough to do. You can daisy-chain the two DMD together and control them from the one Uno or similar. It's up to you what you display, and where. While connected by a ribbon cable, they don't need to be butted to each other to appear as one single display.

Hope that makes sense,
Geoff

QuanNguyen
Posts: 3
Joined: Fri Apr 22, 2016 5:49 am

Re: Any ideal about controlling 2 individual dmd with 2 activity by 1 arduino ?

Post by QuanNguyen » Fri Apr 22, 2016 7:20 am

Thanks for your help ! can u share some code about this , i'm amauter so i need clearly :D
ex : display 2 different text with 2 dmd

User avatar
stryker
Posts: 282
Joined: Sat Jan 14, 2012 2:44 pm

Re: Any ideal about controlling 2 individual dmd with 2 activity by 1 arduino ?

Post by stryker » Fri Apr 22, 2016 10:50 am

Hi,

I don't have anything specifically, but here's how. In the simple example here, two values are displayed. One on each display. One increments from 0 and the other decrements from 999. They could say anything you like. It's true the Arduino is controlling it as one display, but so long as your text is at the right place there's no reason for them to be located adjacent to each other (aside from the ribbon cable length you use).

Code: Select all

#include <SPI.h>
#include <DMD2.h>
#include <fonts/SystemFont5x7.h>

SoftDMD dmd(2,1);                                 // dmd actually controls both displays

// values we'll display
int n1 = 999;
int n2 = 0;

void setup() {
  dmd.setBrightness(255);
  dmd.selectFont(SystemFont5x7);                  // a small font
  dmd.begin();
}

void loop() {
// the first DMD panel extends from LED row 0 to row 15, the second from row 15 to row 31
  dmd.drawString(0,0,String(n1--));               // this text will appear on the first DMD panel on row 0
  if(n1<0) n1== 999;

  dmd.drawString(0,16,String(n2++));              // this text will appear on the second DMD panel, starting at row 16
  if(n2>999) n2=0;
  
  delay(500);
  
  dmd.clearScreen();                              // blank out both panels
} // rinse, repeat
Hope this helps, Geoff

QuanNguyen
Posts: 3
Joined: Fri Apr 22, 2016 5:49 am

Re: Any ideal about controlling 2 individual dmd with 2 activity by 1 arduino ?

Post by QuanNguyen » Fri Apr 22, 2016 2:13 pm

hi , thank u very much :D it done :D best wish for u :3

User avatar
stryker
Posts: 282
Joined: Sat Jan 14, 2012 2:44 pm

Re: Any ideal about controlling 2 individual dmd with 2 activity by 1 arduino ?

Post by stryker » Fri Apr 22, 2016 9:49 pm

Just saw a typo. This

Code: Select all

  if(n1<0) n1== 999;
should of course be

Code: Select all

  if(n1<0) n1= 999;
I just copied a DMD2 example and edited it without testing, so that may not be the only error you find.

Geoff

Post Reply