0

I am making a 20 x 15 LED matrix, and am having some super annoying problems. I was hoping you all could help me find some answers.

It is very important to note that I am following BitLuni's video on this, following it using almost the same parts, and most definitely the same code (I put it below)

To start, this are the main things I am making it with:

6 sets of RGB LED Pixel Lights

1 Knock-off Arduino NANO

1 5v 20A Power Supply

My first problem arose when I received the Arduino Nano. I was able to see it, but not able to write to it. I was eventually able to make it work by using the old boot loader. Let me make it clear, I fixed that problem. But then I short circuited it and bought another one. And now I am faced with the same problem. I have tried using the company's own drivers on the darn thing, same issue. I was going to put the error here, but when I tried to flash, my computer (Windows) got the blue screen of death. I tried opening the app just now, instant death. So I suppose I'll just reinstall it, just saying, something is MESSED UP with it.

Pretty much, I get the error "the selected serial port does not exist or your board is not connected. "I know for a fact that the COM Port is correct, but it just doesn't seem to like what I am doing.

But I still have another problem. While I had the arduino that I got to work, when I transitioned from using the 5v power supply on it to using the power supply I bought, the lights go nuts. They change to seemingly random colors super fast. But as soon as I change it back to the arduino's power, it was fine. I have tested, and the power output is PRECISELY THE SAME. The arduino just sends out the data for the lights to interpret. I have absolutely no idea why this is happening.

So if you have anything to suggest for either of the problems, I would appreciate it.

Also, here is my code for the lights (sorry this post is really chopped up) It is based on Adafruit_NeoMatrix example

#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#ifndef PSTR
 #define PSTR // Make Arduino Due happy
#endif

#define PIN 6

// MATRIX DECLARATION:
// Parameter 1 = width of NeoPixel matrix
// Parameter 2 = height of matrix
// Parameter 3 = pin number (most are valid)
// Parameter 4 = matrix layout flags, add together as needed:
//   NEO_MATRIX_TOP, NEO_MATRIX_BOTTOM, NEO_MATRIX_LEFT, NEO_MATRIX_RIGHT:
//     Position of the FIRST LED in the matrix; pick two, e.g.
//     NEO_MATRIX_TOP + NEO_MATRIX_LEFT for the top-left corner.
//   NEO_MATRIX_ROWS, NEO_MATRIX_COLUMNS: LEDs are arranged in horizontal
//     rows or in vertical columns, respectively; pick one or the other.
//   NEO_MATRIX_PROGRESSIVE, NEO_MATRIX_ZIGZAG: all rows/columns proceed
//     in the same order, or alternate lines reverse direction; pick one.
//   See example below for these values in action.
// Parameter 5 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)


// Example for NeoPixel Shield.  In this application we'd like to use it
// as a 5x8 tall matrix, with the USB port positioned at the top of the
// Arduino.  When held that way, the first pixel is at the top right, and
// lines are arranged in columns, progressive order.  The shield uses
// 800 KHz (v2) pixels that expect GRB color data.
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(20, 15, PIN,
  NEO_MATRIX_TOP     + NEO_MATRIX_LEFT +
  NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG,
  NEO_GRB            + NEO_KHZ800);

void setup() {
  matrix.begin();
  matrix.setTextWrap(false);
  matrix.setBrightness(255);
}

int x    = matrix.width();
int pass = 0;

void loop() {
  static int i = 0;
  i++;
  //matrix.fillScreen(0);
  for(int y = 0; y < 15; y++)
    for(int x = 0; x < 20; x++)
      if(y & 1)
        matrix.setPixelColor(19 - x + y * 20, matrix.gamma32(matrix.ColorHSV((x + y) * 256 * 8 + i * 128 * 2)));
      else
        matrix.setPixelColor(x + y * 20, matrix.gamma32(matrix.ColorHSV((x + y) * 256 * 8+ i * 128 * 2)));

  matrix.setTextColor(matrix.Color(0, 0, 0));
  matrix.setCursor(-((millis() / 30) & 127) + 20, 4);
  matrix.print(F(""));
  matrix.show();
}

Thanks all!

-Micah

  • Do you connect the GND of the second power supply to the GND of the arduino? The LEDs and the arduino need a common voltage reference on the control pin. – Peter Paul Kiefer Oct 30 '19 at 11:15
  • If you disconnect and connect the nano the COM port might change. But in the IDE the it does not change automatically. But this is just a very rough guess. I don't expect this to be correct. – Peter Paul Kiefer Oct 30 '19 at 11:20
  • @jsotola Sorry for not being specific enough and cluttering my post, I'll fix that. I was mostly asking in the post if I was missing anything or doing something wrong with the panel because I was having issues. – Micah Wagoner Oct 30 '19 at 21:18
  • Thank you so much @PeterPaulKiefer! That actually fixed my light problem! I still need to fix the arduino problems but that you so much! – Micah Wagoner Oct 30 '19 at 21:40
  • Update: I ended up just returning the arduino and purchasing another one. – Micah Wagoner Dec 1 '19 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.