-
-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Labels
conclusion: resolvedIssue was resolvedIssue was resolvedtopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
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).
Metadata
Metadata
Assignees
Labels
conclusion: resolvedIssue was resolvedIssue was resolvedtopic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project