l.roca
#1
I am using the Grove - RGB LED Matrix w/Driver, How can I set it to show white light all the time without flashing?
Script:
#include “grove_two_rgb_led_matrix.h”
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#define SERIAL SerialUSB
#else
#define SERIAL Serial
#endif
uint64_t example[] = {
//all white
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
};
void waitForMatrixReady()
{
delay(1000);
}
GroveTwoRGBLedMatrixClass matrix;
void setup()
{
Wire.begin();
SERIAL.begin(115200);
waitForMatrixReady();
uint16_t VID = 0;
VID = matrix.getDeviceVID();
if(VID != 0x2886)
{
SERIAL.println(“Can not detect led matrix!!!”);
while(1);
}
SERIAL.println(“Matrix init success!!!”);
}
void loop()
{
for (int i=0;i<3;i++) {
matrix.displayFrames(example+i*8, 200, false, 1);
delay(1000);
}
}
Baozhu
#2
remove delay(1000);
. It should not flash.
l.roca
#3
When I remove the delay(1000); below the matrix.displayFrames(example+i*8, 200, false, 1) it is flickering in high frequency. Any idea?
Baozhu
#4
Do you use Arduino UNO?These are microprocessors that run too low.That’s true. You can test Arduino with higher speed.
l.roca
#5
I use seeeduino and base shield
Baozhu
#6
it is really slow. You can try a more advanced board.
l.roca
#7
Is there another way to just let it show white light without flashing?
Baozhu
#8
Try this and see if it works
#include “grove_two_rgb_led_matrix.h”
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#define SERIAL SerialUSB
#else
#define SERIAL Serial
#endif
uint64_t example[] = {
//all white
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
0xfefefefefefefefe,
};
void waitForMatrixReady()
{
delay(1000);
}
GroveTwoRGBLedMatrixClass matrix;
void setup()
{
Wire.begin();
SERIAL.begin(115200);
waitForMatrixReady();
uint16_t VID = 0;
VID = matrix.getDeviceVID();
if(VID != 0x2886)
{
SERIAL.println(“Can not detect led matrix!!!”);
while(1);
}
SERIAL.println(“Matrix init success!!!”);
for (int i=0;i<3;i++)
matrix.displayFrames(example+i*8, 200, false, 1);
}
void loop()
{
}