pkourany / RGBmatrixPanel_IDE

Adafruit 16x32 and 32x32 RGB LED matrix panel library adapted for Spark
Other
32 stars 23 forks source link

Particle Photon and a 64x32 pixel RGB Led Matrix panel dont show anything #5

Closed RickardPettersson closed 7 years ago

RickardPettersson commented 7 years ago

Particle Photon and a 64x32 pixel RGB Led Matrix panel dont show anything, the code i running on the photon is below, any ideas what i can do wrong? I have pin everything like in the readme file here on github.:

`// 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_mfGFX/Adafruit_mfGFX.h"   // Core graphics library
#include "RGBmatrixPanel/RGBmatrixPanel.h" // Hardware-specific library
#include "math.h"

// Modify for version of RGBShieldMatrix that you have
// HINT: Maker Faire 2016 Kit and later have shield version 4 (3 prior to that)
//
// NOTE: Version 4 of the RGBMatrix Shield only works with Photon and Electron (not Core)
#define RGBSHIELDVERSION        3

/** Define RGB matrix panel GPIO pins **/
#if (RGBSHIELDVERSION == 4)     // Newest shield with SD socket onboard
    #warning "new shield"
    #define CLK D6
    #define OE  D7
    #define LAT TX
    #define A   A0
    #define B   A1
    #define C   A2
    #define D   RX
#else
    #warning "old shield"
    #define CLK D6
    #define OE  D7
    #define LAT A4
    #define A   A0
    #define B   A1
    #define C   A2
    #define D   A3
#endif
/****************************************/

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

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, 32, 32, matrix.Color333(0, 7, 0));
  delay(500);

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

  // draw an 'X' in red
  matrix.drawLine(0, 0, 31, 31, matrix.Color333(7, 0, 0));
  matrix.drawLine(31, 0, 0, 31, 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(21, 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.setCursor(1, 0);    // start at top left, with one pixel of spacing
  matrix.setTextSize(1);     // size 1 == 8 pixels high
  matrix.setTextWrap(false); // Don't wrap at end of line - will do ourselves

  matrix.setTextColor(matrix.Color333(7,7,7));
  matrix.println(" Ada");
  matrix.println("fruit");

  // 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('3');
  matrix.setTextColor(matrix.Color333(0,7,0));  
  matrix.println('2');

  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
}
pkourany commented 7 years ago

@RickardPettersson, did you also wire up the RGB pins as indicated in RGBmatrixPanel.cpp:

define R1 D0 // bit 2 = RED 1

define G1 D1 // bit 3 = GREEN 1

define B1 D2 // bit 4 = BLUE 1

define R2 D3 // bit 5 = RED 2

define G2 D4 // bit 6 = GREEN 2

define B2 D5 // bit 7 = BLUE 2

RickardPettersson commented 7 years ago

Yes i did, should the led on the photon on D7 we lightning small?

RickardPettersson commented 7 years ago

After some more looking on what can go wrong i think it is that i has not good enough electric dc adapter so i have buyed some new one 4A i need for the display.

RickardPettersson commented 7 years ago

I Tell you in some days.

pkourany commented 7 years ago

@RickardPettersson, great!

davemaster commented 7 years ago

Greetings,

Can You give us the full circuit schematic? Other thing, check your GND connections.

RickardPettersson commented 7 years ago

With the settings below i got it to work.

define RGBSHIELDVERSION 3

RGBmatrixPanel matrix(A, B, C, D,CLK, LAT, OE, true, 64); //64x32 panel