Skip to content

LED Matrix set() method does not work on top row #259

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

Closed
karlsoderby opened this issue Feb 14, 2024 · 0 comments · Fixed by #260
Closed

LED Matrix set() method does not work on top row #259

karlsoderby opened this issue Feb 14, 2024 · 0 comments · Fixed by #260
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@karlsoderby
Copy link
Contributor

While testing the set(x,y,r,g,b) method, I noticed the y coordinate only works from 1 and upwards, skipping the entire top row.

The x coordinate works as intended (starting at 0).

Here is the sketch (just blinks a pixel):

#include "ArduinoGraphics.h"
#include "Arduino_LED_Matrix.h"

ArduinoLEDMatrix matrix;

void setup() {
  //we start the LED matrix
  matrix.begin();
}

void loop() {
  int x = 0;
  int y = 0; //change to 1 to make it work
  matrix.beginDraw();
  matrix.set(x, y, 1,1,1);
  matrix.endDraw();
  delay(100);

  matrix.beginDraw();
  matrix.set(x, y, 0,0,0);
  matrix.endDraw();
  delay(100);
}

Additional Note: the set() method was originally created for an RGB matrix. I think it would make sense to replace 0,0,0 and 1,1,1 with something like PIXEL_OFF / PIXEL_ON, by adding a #define PIXEL_ON 1,1,1.

Like: matrix.set(x, y, PIXEL_ON) instead of matrix.set(x, y, 1, 1, 1).

@aentinger aentinger self-assigned this Feb 14, 2024
@aentinger aentinger added the type: imperfection Perceived defect in any part of project label Feb 14, 2024
aentinger added a commit that referenced this issue Feb 14, 2024
This fixes #259.

Instead the root cause for this issue was within ArduinoGraphics, for a detailed explanation see here: arduino-libraries/ArduinoGraphics#36 .
@per1234 per1234 added the topic: code Related to content of the project itself label Feb 14, 2024
@per1234 per1234 added the conclusion: resolved Issue was resolved label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants