Skip to content

matrix.clear() does not clear the matrix buffer #352

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
ralf-krause opened this issue Jul 22, 2024 · 1 comment
Closed

matrix.clear() does not clear the matrix buffer #352

ralf-krause opened this issue Jul 22, 2024 · 1 comment
Assignees
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@ralf-krause
Copy link

In the "get started" software for the new "Arduino Plug and Make Kit" the UNO R4 matrix shows a scrolling text "Resetting!" with forgotten pixels in the top line. I try to use the command matrix.clear() to clear everything but it does not work.

Please see my example code.
In the first step the sketch draws a line on the top of the matrix.
Then in a second step I try to clear .... yes, the line goes away.
But in the third step the line comes back while the scrolling text does not use the top line of the matrix.

/*
  Test scrolling text and matrix.clear()
*/

// To use ArduinoGraphics APIs
// Please include BEFORE Arduino_LED_Matrix
#include "ArduinoGraphics.h"
#include "Arduino_LED_Matrix.h"

ArduinoLEDMatrix matrix;


void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  // use matrix
  matrix.begin();

  matrix.beginDraw();
  matrix.stroke(0xFFFFFFFF);
  matrix.line(0,0,11,0);
  matrix.endDraw();
  delay(1000);

  matrix.clear();
  delay(1000);

  matrix.beginDraw();
  matrix.textScrollSpeed(80);
  const char text[] = "  Hello World!  ";
  matrix.textFont(Font_5x7);
  matrix.beginText(0, 1, 0xFFFFFF);
  matrix.println(text);
  matrix.endText(SCROLL_LEFT);
  matrix.endDraw();

}

void loop() {
  // put your main code here, to run repeatedly:

}


@per1234 per1234 self-assigned this Aug 3, 2024
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Aug 3, 2024
@per1234
Copy link
Collaborator

per1234 commented Aug 3, 2024

Hi @ralf-krause. Thanks for taking the time to submit an issue.

This bug was previously reported at #336 and already fixed by #335.

There hasn't been a new release of the platform since the time of the fix so this is why you still encounter the bug. If you like, you can manually apply the patch to the Arduino_LED_Matrix.h file in your local installation of the platform:

https://github.com/arduino/ArduinoCore-renesas/pull/335/files

If you want instructions for applying the patch, post over on Arduino Forum and we'll provide assistance over there:

https://forum.arduino.cc/c/hardware/uno-r4/uno-r4-wifi/189

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants