When I use Serial.begin() or Wire.begin() function at same time, the matrix seems not works?
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#ifndef PSTR
#define PSTR // Make Arduino Due happy
#endif
#define PIN 6
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(8, 8, PIN,
NEO_MATRIX_TOP + NEO_MATRIX_RIGHT +
NEO_MATRIX_COLUMNS + NEO_MATRIX_PROGRESSIVE,
NEO_GRB + NEO_KHZ800);
const uint16_t colors[] = {matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(0, 0, 255)};
void setup()
{
Serial.begin(9600);
matrix.begin();
matrix.setTextWrap(false);
matrix.setBrightness(32);
matrix.setTextColor(colors[0]);
}
// Can't work?
void loop()
{
matrix.fillScreen(0);
matrix.setCursor(0, 0);
matrix.print(F("1234"));
matrix.show();
When I use Serial.begin() or Wire.begin() function at same time, the matrix seems not works?