16 x 32 LED Matrix blinking

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
PyrusBoy
 
Posts: 5
Joined: Sat Feb 27, 2016 3:50 am

16 x 32 LED Matrix blinking

Post by PyrusBoy »

Hello, I have just encountered a problem with the above. I ran my code for about a year with no problems. I wanted to change a temperature. I initially ran with the line RGBmatrixPanel matrix (A, B, C, CLK, LAT, OE, true); but now for some reason it will only run with the last being "false" . This leads to the display blinking every 1/4 second or so.
Before it was smooth display.
Any help please, I have tried all I can find on the subject. (Could it be an update to the library)[//Jaccuzzi Temperature Panel, uses 16 x 32 RGB panel and UNO.
#include <RGBmatrixPanel.h>

#define CLK 8
#define OE 9
#define LAT A3
#define A A0
#define B A1
#define C A2

RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false);
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 11
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

void setup() {
matrix.begin();
}

void loop() {

sensors.requestTemperatures();
int temp1 = (sensors.getTempCByIndex(0));
matrix.fillScreen(matrix.Color333(0, 0, 0));
if (temp1 < 29) {
matrix.drawRect(0, 0, 32, 16, matrix.Color333(0, 0, 7));
}
if ((temp1 == 29) || (temp1 == 30)) {
matrix.drawRect(0, 0, 32, 16, matrix.Color333(0, 7, 0));
}
if (temp1 >= 31) {
matrix.drawRect(0, 0, 32, 16, matrix.Color333(7, 0, 0));
}
// matrix.setTextColor(matrix.ColorHSV(0, 255, 255, true));
matrix.setTextSize(1);
matrix.setTextWrap(false);
matrix.setCursor(5, 4);
matrix.println(temp1);
matrix.setCursor(21, 4);
matrix.println("C");
matrix.swapBuffers(false);
}][/code]

User avatar
blnkjns
 
Posts: 963
Joined: Fri Oct 02, 2020 3:33 am

Re: 16 x 32 LED Matrix blinking

Post by blnkjns »

For a buffer swap, my calculation says you would need 3kB of RAM, which the UNO does not have. Did it work on the UNO before?

User avatar
PyrusBoy
 
Posts: 5
Joined: Sat Feb 27, 2016 3:50 am

Re: 16 x 32 LED Matrix blinking

Post by PyrusBoy »

Many thanks for your reply, Yes worked well, with a pure display. I am running on a 5 volt regulated supply drawing 250Ma approx.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”