Page 1 of 1

Usage of DMD2 with Ethernet shield

Posted: Thu Mar 31, 2016 3:18 am
by GrosDede
Hi,

I would like to use both Ethernet shield with DMD displays, but it does not work out-of-the-box.

I seams that there is a software conflict with Timer1.
Is it possible to add in DMD2 a way to initialize DMD without timers, but without having to edit library files ?

There seams to have also a pin conflict with your base connector.
I use dupont cables to change pins.
But I didn't figure how I can rewire for usage with ethernet shield (using both ethernet and SD card).

Do you have a successfull example of usage of DMD displays with ethernet shield ?

Thanks :)

Re: Usage of DMD2 with Ethernet shield

Posted: Sun Apr 03, 2016 5:28 am
by andrew
You can use different pins for the DMD by using the SoftDMD function in the DMD library. You will need to manually run wires from the DMD cable to the board however this eliminates the Ethernet conflict.

Re: Usage of DMD2 with Ethernet shield

Posted: Sun Apr 03, 2016 8:24 pm
by GrosDede
Hi,

That's what I am trying, but I have not figured out what I did wrong yet. So I was asking if someone has figured how to plug the connector's pins, with a sample app :)

Edit : found a shield pin usage page.

Edit 2 : according to Arduino forum, analog pins can be used as digital output.
Original pin layout is :

Code: Select all

SoftDMD dmd(DMD_WIDTH, DMD_HEIGHT, 9, 6, 7, 8, 13, 11);
So I tried :

Code: Select all

SoftDMD dmd(DMD_WIDTH, DMD_HEIGHT, A0, A1, A2, A3, A4, A5);
and rewired accordingly. There are 2 unused pins (10 and 12) that I have plugged to GND.

It's working :)

Re: Usage of DMD2 with Ethernet shield

Posted: Mon Apr 04, 2016 5:13 am
by angusgr
Glad you got it sorted out. :)

Re: Usage of DMD2 with Ethernet shield

Posted: Mon Apr 04, 2016 5:17 am
by GrosDede
I managed to wire it but with manual scan in the loop() function.

Next steps : try to use a timer, avoir flickering, and free analog ping to use Wire lib for a RTC module.

Re: Usage of DMD2 with Ethernet shield

Posted: Mon Jun 04, 2018 12:22 am
by Ahmed1
Good day gents
Can you help me explain
What you do exactly to make the sheild work with DMD

Thanks
Ahmed

Re: Usage of DMD2 with Ethernet shield

Posted: Mon Jul 23, 2018 4:43 am
by danieldewaard
Hey Ahmed,

Have a look at the following project for some inspiration: https://www.instructables.com/id/Home-A ... em-with-a/

Cheers,
Daniel

Re: Usage of DMD2 with Ethernet shield

Posted: Sun Jun 07, 2020 7:55 pm
by isass
Hi guys. i write some code but after loading don't show my word. plz check my code if can repair that

Code: Select all

#include <SPI.h>
#include <DMD2.h>
 
#include <fonts/Arial_black_16.h>
#include <stdlib.h>
#include <Ethernet.h>

#include <fonts/Droid_Sans_16.h>

#define DISPLAYS_WIDE 3
#define DISPLAYS_HIGH 2

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = {192, 168, 1, 120};
byte subnet[] = {255, 255, 255, 0};
byte gateway[] = {192, 168, 1, 1};
EthernetServer server(80);
EthernetClient client;

String ayarlanan;

const int WIDTH = 1;

const uint8_t *FONT = Arial_Black_16;

SoftDMD dmd(DISPLAYS_WIDE,DISPLAYS_HIGH);  



void setup(void) {
  Ethernet.begin (mac, ip, gateway ,subnet); 
  server.begin();
  
  Serial.begin(9600);

 
     dmd.begin(); 
     dmd.setBrightness(10); 
   
    ayarlanan= "110";
    
}


void loop() {
    setup_DMD();

    
    web_page();




    }

    void setup_DMD(){

     dmd.selectFont(Arial_Black_16);
     dmd.drawString(3, 1, "M/Min:");
     dmd.drawString(3, 16, "Target:");
     dmd.drawString(65, 16, ayarlanan);
      
    }
    void web_page(){

           EthernetClient client = server.available();
           if(client.available()){    
           while(client.connected()){
      
          client.println("<HTTP\1.1 200 OK>");
          client.println("<Connection-Type: text/html>");
          client.println("<Connection: close>");
          client.println();
          client.println("<!DOCTYPE html>");
          client.println("<html>");
          client.println("<head>");
          client.println("<title>LEMANIC TARGET AYARI</title>");
          client.println("</head>");
          client.println("<body>");
          client.println("<body><div style='text-align: center'>");
          client.println("<body><body bgcolor='#DDDDFF'>");
          client.println("<H1 style='color: #0066FF;'>LEMANIC TARGET AYARI</H1>");
          client.println("<br />");
          client.println("<hr Size=20 noshade/>");
          client.println("<br />"); 
          client.println("<H2> ISTEDIGINIZ TARGETI YAZINIZ </H2>");          
          client.println( "<input type=\"number\" maxlength=\"3\"  value=\"ayarlanan\" name=ayarlanan\" >");
          client.println('ayarlanan');
          client.println(" M/min");
          client.println("<br /><br />");
          client.println("<button type=button name= >EVET</button>");
          client.println("<br /><br />");
          client.println("<H3>AYARLANAN TARGET </H3>" ) ;
          client.println('ayarlanan');
          client.println(" M/min");
          client.println("<H3>MAKINE ANLIK HIZI </H3>") ;
          client.println('sonuc');
          client.println(" M/min");
          client.println("<br />");
          delay(10);
          client.stop();
          
        }
     }
      
    }