Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in function setLed() #7

Closed
OE9SBV opened this issue Aug 25, 2015 · 2 comments
Closed

Bug in function setLed() #7

OE9SBV opened this issue Aug 25, 2015 · 2 comments
Labels

Comments

@OE9SBV
Copy link

OE9SBV commented Aug 25, 2015

You can set only one LED in the same row. If you set another LED in the same row the other turns off!

@wayoda
Copy link
Owner

wayoda commented Aug 28, 2015

Sorry, but can't confirm this behaviour. Here is stripped down version of the LedControl matrix example that blinks/lights up all of the leds on the matrix one after the other. Do you see a different result when you run this code with your hardware?

//We always have to include the library
#include "LedControl.h"

/*
 Now we need a LedControl to work with.
 ***** These pin numbers will probably not work with your hardware *****
 pin 12 is connected to the DataIn 
 pin 11 is connected to the CLK 
 pin 10 is connected to LOAD 
 We have only a single MAX72XX.
 */
LedControl lc=LedControl(12,11,10,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime=75;

void setup() {
  /*
   The MAX72XX is in power-saving mode on startup,
   we have to do a wakeup call
   */
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,8);
  /* and clear the display */
  lc.clearDisplay(0);
}


/* 
 This function will light up every Led on the matrix.
 The led will blink along with the row-number.
 row number 4 (index==3) will blink 4 times etc.
 */
void single() {
  for(int row=0;row<8;row++) {
    for(int col=0;col<8;col++) {
      delay(delaytime);
      lc.setLed(0,row,col,true);
      delay(delaytime);
      for(int i=0;i<col;i++) {
        lc.setLed(0,row,col,false);
        delay(delaytime);
        lc.setLed(0,row,col,true);
        delay(delaytime);
      }
    }
  }
}

void loop() { 
  single();
  lc.clearDisplay(0);

}

@wayoda wayoda added the invalid label Aug 29, 2015
@wayoda
Copy link
Owner

wayoda commented Aug 29, 2015

No update on the issue from the OP.
Closing as "invalid"

@wayoda wayoda closed this as completed Aug 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants