Rgb led matrix 64x32 half pink half white

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Dzh121
 
Posts: 5
Joined: Sun Jul 03, 2022 11:59 am

Rgb led matrix 64x32 half pink half white

Post by Dzh121 »

Hi I today recived my 64x32 adafruit rgb led matrix. Insted of seeing any patterns i only see half white and half pink.
I am connected to arduino mega and the matrix is connected to 5V 3A power supply.
I also made sure everything is connected and made sure to change

Code: Select all

#define CLK  8
to

Code: Select all

 #define CLK  11
The example code i tried testshapes_32x64.ino(also any other code show the same thing(pink and white)):

Code: Select all

// testshapes demo for RGBmatrixPanel library.
// Demonstrates the drawing abilities of the RGBmatrixPanel library.
// For 32x64 RGB LED matrix.

// WILL NOT FIT on ARDUINO UNO -- requires a Mega, M0 or M4 board

#include <RGBmatrixPanel.h>

// Most of the signal pins are configurable, but the CLK pin has some
// special constraints.  On 8-bit AVR boards it must be on PORTB...
// Pin 11 works on the Arduino Mega.  On 32-bit SAMD boards it must be
// on the same PORT as the RGB data pins (D2-D7)...
// Pin 8 works on the Adafruit Metro M0 or Arduino Zero,
// Pin A4 works on the Adafruit Metro M4 (if using the Adafruit RGB
// Matrix Shield, cut trace between CLK pads and run a wire to A4).

//#define CLK  8   // USE THIS ON ADAFRUIT METRO M0, etc.
//#define CLK A4 // USE THIS ON METRO M4 (not M0)
#define CLK 11 // USE THIS ON ARDUINO MEGA
#define OE   9
#define LAT 10
#define A   A0
#define B   A1
#define C   A2
#define D   A3

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 64);

void setup() {

  matrix.begin();

  // draw a pixel in solid white
  matrix.drawPixel(0, 0, matrix.Color333(7, 7, 7));
  delay(500);

  // fix the screen with green
  matrix.fillRect(0, 0, matrix.width(), matrix.height(), matrix.Color333(0, 7, 0));
  delay(500);

  // draw a box in yellow
  matrix.drawRect(0, 0, matrix.width(), matrix.height(), matrix.Color333(7, 7, 0));
  delay(500);

  // draw an 'X' in red
  matrix.drawLine(0, 0, matrix.width()-1, matrix.height()-1, matrix.Color333(7, 0, 0));
  matrix.drawLine(matrix.width()-1, 0, 0, matrix.height()-1, matrix.Color333(7, 0, 0));
  delay(500);

  // draw a blue circle
  matrix.drawCircle(10, 10, 10, matrix.Color333(0, 0, 7));
  delay(500);

  // fill a violet circle
  matrix.fillCircle(40, 21, 10, matrix.Color333(7, 0, 7));
  delay(500);

  // fill the screen with 'black'
  matrix.fillScreen(matrix.Color333(0, 0, 0));

  // draw some text!
  matrix.setTextSize(1);     // size 1 == 8 pixels high
  matrix.setTextWrap(false); // Don't wrap at end of line - will do ourselves

  matrix.setCursor(8, 0);    // start at top left, with 8 pixel of spacing
  uint8_t w = 0;
  char *str = "AdafruitIndustries";
  for (w=0; w<8; w++) {
    matrix.setTextColor(Wheel(w));
    matrix.print(str[w]);
  }
  matrix.setCursor(2, 8);    // next line
  for (w=8; w<18; w++) {
    matrix.setTextColor(Wheel(w));
    matrix.print(str[w]);
  }
  matrix.println();
  //matrix.setTextColor(matrix.Color333(4,4,4));
  //matrix.println("Industries");
  matrix.setTextColor(matrix.Color333(7,7,7));
  matrix.println("LED MATRIX!");

  // print each letter with a rainbow color
  matrix.setTextColor(matrix.Color333(7,0,0));
  matrix.print('3');
  matrix.setTextColor(matrix.Color333(7,4,0));
  matrix.print('2');
  matrix.setTextColor(matrix.Color333(7,7,0));
  matrix.print('x');
  matrix.setTextColor(matrix.Color333(4,7,0));
  matrix.print('6');
  matrix.setTextColor(matrix.Color333(0,7,0));
  matrix.print('4');
  matrix.setCursor(34, 24);
  matrix.setTextColor(matrix.Color333(0,7,7));
  matrix.print('*');
  matrix.setTextColor(matrix.Color333(0,4,7));
  matrix.print('R');
  matrix.setTextColor(matrix.Color333(0,0,7));
  matrix.print('G');
  matrix.setTextColor(matrix.Color333(4,0,7));
  matrix.print('B');
  matrix.setTextColor(matrix.Color333(7,0,4));
  matrix.print('*');

  // whew!
}

void loop() {
  // Do nothing -- image doesn't change
}


// Input a value 0 to 24 to get a color value.
// The colours are a transition r - g - b - back to r.
uint16_t Wheel(byte WheelPos) {
  if(WheelPos < 8) {
   return matrix.Color333(7 - WheelPos, WheelPos, 0);
  } else if(WheelPos < 16) {
   WheelPos -= 8;
   return matrix.Color333(0, 7-WheelPos, WheelPos);
  } else {
   WheelPos -= 16;
   return matrix.Color333(WheelPos, 0, 7 - WheelPos);
  }
}
Front colors
Front colors
front.jpeg (238.77 KiB) Viewed 2085 times
Back
Back
back.jpeg (190.97 KiB) Viewed 2085 times
Thanks!

User avatar
adafruit_support_mike
 
Posts: 68003
Joined: Thu Feb 11, 2010 2:51 pm

Re: Rgb led matrix 64x32 half pink half white

Post by adafruit_support_mike »

As a sanity check, do you have an Uno you can use for a comparison test?

User avatar
Dzh121
 
Posts: 5
Joined: Sun Jul 03, 2022 11:59 am

Re: Rgb led matrix 64x32 half pink half white

Post by Dzh121 »

adafruit_support_mike wrote:As a sanity check, do you have an Uno you can use for a comparison test?
To use the 64x32 you need the arduino mega, do you want just to see the size of the rgb matrix?
Attachments
uno by rgb.jpg
uno by rgb.jpg (155.22 KiB) Viewed 1532 times

User avatar
Dzh121
 
Posts: 5
Joined: Sun Jul 03, 2022 11:59 am

Re: Rgb led matrix 64x32 half pink half white

Post by Dzh121 »

Also forgot to mention that i connected the clk to 11 instend of 8

User avatar
argonblue
 
Posts: 96
Joined: Wed Apr 25, 2012 12:18 am

Re: Rgb led matrix 64x32 half pink half white

Post by argonblue »

What's the shield you're using? Is it https://www.adafruit.com/product/2601 ? Its learning guide page says it's not directly compatible with Arduino Mega, but I haven't looked up the details of why.

User avatar
Dzh121
 
Posts: 5
Joined: Sun Jul 03, 2022 11:59 am

Re: Rgb led matrix 64x32 half pink half white

Post by Dzh121 »

argonblue wrote:What's the shield you're using? Is it https://www.adafruit.com/product/2601 ? Its learning guide page says it's not directly compatible with Arduino Mega, but I haven't looked up the details of why.
That is the shield im using. If it isnt compatible with the arduino mega how then i connect it?

User avatar
argonblue
 
Posts: 96
Joined: Wed Apr 25, 2012 12:18 am

Re: Rgb led matrix 64x32 half pink half white

Post by argonblue »

https://learn.adafruit.com/32x16-32x32- ... mper-wires shows how to connect the Arduino Mega for a different matrix, but I think it uses the same bus pinout.

Some pins (control lines, I think?) can be the same as with the Uno, but the RGB data wires have to be different, because the library relies on them being all on the same ATmega GPIO port. The mapping of ATmega ports to Arduino pins is different for the Arduino Mega. The example should probably make that more clear.

User avatar
argonblue
 
Posts: 96
Joined: Wed Apr 25, 2012 12:18 am

Re: Rgb led matrix 64x32 half pink half white

Post by argonblue »

I think you might be able to partially use the shield if you cut the R1, B1, etc. solder jumpers and solder in wires to connect to the correct Arduino Mega pins. I don't know how much the shield circuit board would physically get in the way of the needed Mega headers, though.

User avatar
Dzh121
 
Posts: 5
Joined: Sun Jul 03, 2022 11:59 am

Re: Rgb led matrix 64x32 half pink half white

Post by Dzh121 »

argonblue wrote:https://learn.adafruit.com/32x16-32x32- ... mper-wires shows how to connect the Arduino Mega for a different matrix, but I think it uses the same bus pinout.

Some pins (control lines, I think?) can be the same as with the Uno, but the RGB data wires have to be different, because the library relies on them being all on the same ATmega GPIO port. The mapping of ATmega ports to Arduino pins is different for the Arduino Mega. The example should probably make that more clear.
thank you i used jumper wire instend of the shield and it works fine! thank you

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”