Store › Forums › RGB Matrix Backpack › Bugs/Problems › No let would Lit
- This topic has 0 replies, 1 voice, and was last updated 8 years, 2 months ago by simon_schvartzman.
Viewing 1 post (of 1 total)
-
AuthorPosts
-
October 16, 2016 at 2:11 pm #8503simon_schvartzmanParticipant
NOTE: same as posted on ADAFRUIT forum
Hi, if I run the following scketch all leds will turn ON in sequence as expected
// testshapes demo for Adafruit RGBmatrixPanel library. // Demonstrates the drawing abilities of the RGBmatrixPanel library. // For 32x32 RGB LED matrix: // http://www.adafruit.com/products/607 // Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon // for Adafruit Industries. // BSD license, all text above must be included in any redistribution. #include <Adafruit_GFX.h> // Core graphics library #include <RGBmatrixPanel.h> // Hardware-specific library // If your 32x32 matrix has the SINGLE HEADER input, // use this pinout: #define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega) #define OE 9 #define LAT 10 #define A A0 #define B A1 #define C A2 #define D A3 // If your matrix has the DOUBLE HEADER input, use: //#define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega) //#define LAT 9 //#define OE 10 //#define A A3 //#define B A2 //#define C A1 //#define D A0 RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false); char ledMatrix[32][32] = {{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','1','1','1','0','1','1','0','0','1','0','1','1','1','1','1','1','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','0','0','0','1','0','0','1','0','0','1','0','1','0','0','0','0','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','0','1','0','1','0','1','0','1','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','0','0','1','0','0','1','0','1','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','1','1','0','0','0','1','0','1','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','0','0','0','1','0','0','0','0','0','0','0','1','0','0','0','0','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','1','1','1','0','1','0','1','0','1','0','1','1','1','1','1','1','1','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','0','0','1','0','1','0','1','0','0','1','0','0','1','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','1','1','1','0','1','0','0','1','0','1','0','0','1','0','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','0','1','1','1','0','0','0','1','0','1','1','1','1','1','0','0','1','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','0','0','0','1','1','0','1','0','1','1','0','0','0','1','0','1','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','1','1','0','1','0','1','0','0','1','1','1','0','1','0','0','1','1','0','1','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','1','0','1','0','0','1','0','1','0','1','0','1','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','1','1','1','0','0','0','1','0','0','1','1','0','1','1','1','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','0','0','0','1','0','0','1','0','1','1','1','1','0','0','1','1','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','0','1','1','1','0','0','1','0','0','0','1','1','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','1','0','0','0','1','0','0','1','1','0','1','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','0','1','1','0','1','0','0','1','0','1','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','0','0','0','1','0','1','1','1','1','1','0','1','0','1','1','0','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','1','1','1','0','1','1','0','1','1','0','0','1','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}}; void setup() { matrix.begin(); for (int i = 0; i < 32; i = i + 1) { for (int j = 0; j < 32; j = j + 1) { matrix.drawPixel(i, j, matrix.Color333(0, 7, 0)); delay (5); if (ledMatrix [i] [j] == '1' ) { //matrix.drawPixel(i, j, matrix.Color333(7, 0, 0)); //delay (5); } else { //matrix.drawPixel(i, j, matrix.Color333(0, 0, 7)); //delay (5); } } } } void loop() { // do nothing }
but If I run this one, no LED will turn ON, can’t find what I’m doing wrong (if anything…)
// testshapes demo for Adafruit RGBmatrixPanel library. // Demonstrates the drawing abilities of the RGBmatrixPanel library. // For 32x32 RGB LED matrix: // http://www.adafruit.com/products/607 // Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon // for Adafruit Industries. // BSD license, all text above must be included in any redistribution. #include <Adafruit_GFX.h> // Core graphics library #include <RGBmatrixPanel.h> // Hardware-specific library // If your 32x32 matrix has the SINGLE HEADER input, // use this pinout: #define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega) #define OE 9 #define LAT 10 #define A A0 #define B A1 #define C A2 #define D A3 // If your matrix has the DOUBLE HEADER input, use: //#define CLK 8 // MUST be on PORTB! (Use pin 11 on Mega) //#define LAT 9 //#define OE 10 //#define A A3 //#define B A2 //#define C A1 //#define D A0 RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false); char ledMatrix[32][32] = {{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','1','1','1','0','1','1','0','0','1','0','1','1','1','1','1','1','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','0','0','0','1','0','0','1','0','0','1','0','1','0','0','0','0','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','0','1','0','1','0','1','0','1','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','0','0','1','0','0','1','0','1','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','1','1','0','0','0','1','0','1','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','0','0','0','1','0','0','0','0','0','0','0','1','0','0','0','0','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','1','1','1','0','1','0','1','0','1','0','1','1','1','1','1','1','1','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','0','0','1','0','1','0','1','0','0','1','0','0','1','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','1','1','1','0','1','0','0','1','0','1','0','0','1','0','1','1','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','0','1','1','1','0','0','0','1','0','1','1','1','1','1','0','0','1','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','0','0','0','1','1','0','1','0','1','1','0','0','0','1','0','1','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','1','1','0','1','0','1','0','0','1','1','1','0','1','0','0','1','1','0','1','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','1','0','1','0','0','1','0','1','0','1','0','1','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','1','1','1','0','0','0','1','0','0','1','1','0','1','1','1','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','0','0','0','1','0','0','1','0','1','1','1','1','0','0','1','1','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','0','1','1','1','0','0','1','0','0','0','1','1','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','1','0','0','0','1','0','0','1','1','0','1','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','1','1','1','0','1','0','1','0','1','1','0','1','0','0','1','0','1','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','1','0','0','0','0','0','1','0','1','1','1','1','1','0','1','0','1','1','0','0','1','0','0','0','0','0','0'}, {'0','0','0','0','0','1','1','1','1','1','1','1','0','1','1','0','1','1','0','0','1','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}, {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'}}; void setup() { matrix.begin(); for (int i = 0; i < 32; i = i + 1) { for (int j = 0; j < 32; j = j + 1) { //matrix.drawPixel(i, j, matrix.Color333(0, 7, 0)); delay (5); if (ledMatrix [i] [j] == '1' ) { matrix.drawPixel(i, j, matrix.Color333(7, 0, 0)); delay (5); } else { matrix.drawPixel(i, j, matrix.Color333(0, 0, 7)); delay (5); } } } } void loop() { // do nothing }
- This topic was modified 8 years, 2 months ago by simon_schvartzman.
-
AuthorPosts
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.