Help! Rgb led matrix display problems!

Good day,

I have a 32x64 rgb led matrix from adafruit, and connected it according to the "https://github.com/pixelmatix/SmartMatrix/blob/master/extras/hardware/SmartMatrixSD_V3.pdf" instructions and run code from the arduino software. It worked well for sometime but out of nowhere I set it up to run it and it stopped working correctly! it displays random patterns, I triple checked all my connections and used all different wiring and even uninstalled the arduino software and reinstalled it again. For some reason having trouble uploading the picture, however when I run a piece of code like the FeatureDemo and what is being displayed are random things like a line or a square just a bunch of random output. My project has come to a complete halt at this point and I hope someone will be able to see something I may have missed. Thank you in the advance.
 
... and how do you want us to reproduce and diagnose the problem without your code (Forum rule!), schematics and pictures of your setup/wiring and perhaps a short video or more pictures of the erroneous display? You even don’t write which Teensy you use... Cristal spheres are nice items, but they don‘t help when it comes to guess what you see in front of you. .
 
You do specify featureDemo but it this case it matters what was supposed to be displayed for a given wrong pattern, since you mention a square which indicates not purely random. Cutting it down to say a single colour to all pixels may be informative, as will checking your power supply voltage while things are running. As Theremingenieur noted LED pixel problems as described can be pretty much anything so some more information and testing with the offending hardware would be useful.
 
Good day,

Thank you for you thoughts, it seems I have unintentionally missed out a few crucial details, the microcontroller i'm using is the teensy 3.1. I attempted for more than 2hrs to upload the code, pics and a short video individually and in a zip file but failed every time, for that reason I have chosen to improvise by posting them on a facebook account, I made it public so that anyone can view them but it requires you to login, I hope that wont be an issue.

the pictures here:

https://www.facebook.com/ekusas.noi...72565756645.1073741828.100009017620488&type=3

the power supply used was a 5v 12amps. the setup was done according to a diagram I found online here: https://github.com/pixelmatix/SmartMatrix/blob/master/extras/hardware/SmartMatrixSD_V3.pdf
a photo of is in the facebook link.

the video here:

https://www.facebook.com/ekusas.noitcefrep/media_set?set=vb.100009017620488&type=2

this happened on every example code that I tried, multilayer, featured demo........ this was one of the many strange outputs, it happens a handful of times were just a small line of 6-7 LED's are on, the colors vary as well, some arbitrary outputs.

here is where the code was taken from:

https://github.com/pixelmatix/SmartMatrix/tree/master/examples

https://github.com/pixelmatix/SmartMatrix/releases (1/4 of the page down a downloadable version)


***************************additional details******************************

One thing I'd like to mention weather it matters or not but the last thing I attempted before it malfunctioned was implementing wifi functionality with the "ESP8266" and ran this code:


LINK: https://forum.pjrc.com/threads/27850-A-Guide-To-Using-ESP8266-With-TEENSY-3

Code:
Code:
/* Based on:
 * ====== ESP8266 Demo ======
 * (Updated Dec 14, 2014)
 * Ray Wang @ Rayshobby LLC
 * [url]http://rayshobby.net/?p=9734[/url]
 * ==========================
 *
 * Modified by R. Wozniak
 * Compiled with Arduino 1.60 and Teensyduino 1.21b6
 * ESP8266 Firmware: AT21SDK95-2015-01-24.bin
 *
 * Change SSID and PASS to match your WiFi settings.
 * The IP address is displayed serial upon successful connection.
 */

#define BUFFER_SIZE 1024

#define SSID  "YOUR-SSID"      // change this to match your WiFi SSID
#define PASS  "your password"  // change this to match your WiFi password
#define PORT  "15164"           // using port 8080 by default

char buffer[BUFFER_SIZE];

// By default we are looking for OK\r\n
char OKrn[] = "OK\r\n";
byte wait_for_esp_response(int timeout, char* term=OKrn) {
  unsigned long t=millis();
  bool found=false;
  int i=0;
  int len=strlen(term);
  // wait for at most timeout milliseconds
  // or if OK\r\n is found
  while(millis()<t+timeout) {
    if(Serial1.available()) {
      buffer[i++]=Serial1.read();
      if(i>=len) {
        if(strncmp(buffer+i-len, term, len)==0) {
          found=true;
          break;
        }
      }
    }
  }
  buffer[i]=0;
  Serial.print(buffer);
  return found;
}

void setup() {

  // assume esp8266 operates at 115200 baud rate
  // change if necessary to match your modules' baud rate
  Serial1.begin(115200);  // Teensy Hardware Serial port 1   (pins 0 and 1)
  Serial.begin(115200);   // Teensy USB Serial Port
  
  delay(5000);
  Serial.println("begin.");  
  setupWiFi();

  // print device IP address
  Serial.print("device ip addr: ");
  Serial1.println("AT+CIFSR");
  wait_for_esp_response(1000);
}

bool read_till_eol() {
  static int i=0;
  if(Serial1.available()) {
    buffer[i++]=Serial1.read();
    if(i==BUFFER_SIZE)  i=0;
    if(i>1 && buffer[i-2]==13 && buffer[i-1]==10) {
      buffer[i]=0;
      i=0;
      Serial.print(buffer);
      return true;
    }
  }
  return false;
}

void loop() {
  int ch_id, packet_len;
  char *pb;  
  if(read_till_eol()) {
    if(strncmp(buffer, "+IPD,", 5)==0) {
      // request: +IPD,ch,len:data
      sscanf(buffer+5, "%d,%d", &ch_id, &packet_len);
      if (packet_len > 0) {
        // read serial until packet_len character received
        // start from :
        pb = buffer+5;
        while(*pb!=':') pb++;
        pb++;
        if (strncmp(pb, "GET /", 5) == 0) {
          wait_for_esp_response(1000);
          Serial.println("-> serve homepage");
          serve_homepage(ch_id);
        }
      }
    }
  }
}

void serve_homepage(int ch_id) {
  
String header = "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nConnection: close\r\nRefresh: 300\r\n";

  String content="";
    content += "<!DOCTYPE html>";
    content += "<html>";
    content += "<body>";
    
    content += " <h1> Abraham Lincoln's Gettysburg Address </h1> <br/>  ";
       
    content += "<p> <strong> Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal. <br/>";
    content += " <br/>";
    content += "Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this. <br/>";
    content += " <br/>";
    content += "But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth. <br/>";
    content += " <br/>";
    content += "Abraham Lincoln <br/>";
    content += "November 19, 1863 </strong> </p> <br/>";
    
    content += " <br/>";
    content += " <p> <font color=#880088> This message brought to you by - TEENSY 3.1 & ESP8266 </font> </p>";
    content += " <p> Teensy server uptime ";
    Serial.print("***************************************** UPTIME = ");
    Serial.println(millis());
    content += "<font color=#0000FF> ";
    content += String(millis());
    content += " milliseconds </font> </p>";
    
      
    content += "</body>";
    content += "</html>";
    content += "<br />\n";       
    content += "\r\n";       

  header += "Content-Length:";
  header += (int)(content.length());
  header += "\r\n\r\n";
  Serial1.print("AT+CIPSEND=");
  Serial1.print(ch_id);
  Serial1.print(",");
  Serial1.println(header.length()+content.length());
  if(wait_for_esp_response(2000)) {
   //delay(100);
   Serial1.print(header);
   Serial1.print(content);
  } 
  else {
  Serial1.print("AT+CIPCLOSE=");
  Serial1.println(ch_id);
 }
}

void setupWiFi() {

  // turn on echo
  Serial1.println("ATE1");
  wait_for_esp_response(1000);
  
  // try empty AT command
  //Serial1.println("AT");
  //wait_for_esp_response(1000);

  // set mode 1 (client)
  Serial1.println("AT+CWMODE=3");
  wait_for_esp_response(1000); 
 
  // reset WiFi module
  Serial1.print("AT+RST\r\n");
  wait_for_esp_response(1500);

   //join AP
  Serial1.print("AT+CWJAP=\"");
  Serial1.print(SSID);
  Serial1.print("\",\"");
  Serial1.print(PASS);
  Serial1.println("\"");
  wait_for_esp_response(5000);

  // start server
  Serial1.println("AT+CIPMUX=1");
   wait_for_esp_response(1000);
  
  //Create TCP Server in 
  Serial1.print("AT+CIPSERVER=1,"); // turn on TCP service
  Serial1.println(PORT);
   wait_for_esp_response(1000);
  
  Serial1.println("AT+CIPSTO=30");  
  wait_for_esp_response(1000);

  Serial1.println("AT+GMR");
  wait_for_esp_response(1000);
  
  Serial1.println("AT+CWJAP?");
  wait_for_esp_response(1000);
  
  Serial1.println("AT+CIPSTA?");
  wait_for_esp_response(1000);
  
  Serial1.println("AT+CWMODE?");
  wait_for_esp_response(1000);
  
  Serial1.println("AT+CIFSR");
  wait_for_esp_response(5000);
  
  Serial1.println("AT+CWLAP");
  wait_for_esp_response(5000);
  
  Serial.println("---------------*****##### READY TO SERVE #####*****---------------");
  
}
 
Last edited by a moderator:
Back
Top