Sure thing.
sketch_a.ino will flash like the first image I posted. The list of 16 LEDs will flash dimly, and the desired LED (frame[2][7]) stays dark.
// sketch_a.ino
#include "Arduino_LED_Matrix.h"
ArduinoLEDMatrix matrix;
void setup() {
Serial.begin(115200);
matrix.begin();
}
uint8_t frame[8][12] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 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 off() {
// Faulty LED off
frame[2][7] = 0;
}
void on() {
// Faulty LED on
frame[2][7] = 1;
}
void loop()
{
off();
matrix.renderBitmap(frame, 8, 12);
delay(300);
on();
matrix.renderBitmap(frame, 8, 12);
delay(300);
}
sketch_b.ino results in the second photo. All LEDs are illuminated except frame[2][7], despite the sketch specifying all LEDs should be lit.
// sketch_b.ino
#include "Arduino_LED_Matrix.h"
ArduinoLEDMatrix matrix;
void setup() {
Serial.begin(115200);
matrix.begin();
}
uint8_t frame[8][12] = {
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
};
void loop()
{
matrix.renderBitmap(frame, 8, 12);
}
I should also note that the demo program that came with the R4 also exhibited this issue. The "large heart" part of the demo, as well as the Tetris portion, both attempt the activate the problem LED, with the same result (desired LED stays dark, subset of 16 other LEDs light up slightly).