Hi, I require some help regarding scrolling Time values from DS3231 on a MAX7219 hardware using MD Parola library. With the help of examples, I was able to scroll static text. But when I try to do the same with RTC values, the compiler indicates:
no matching function for call to 'MD_Parola::displayText(String&, textPosition_t, int, int, textEffect_t, textEffect_t)'
Following is the code used to perform the desired task. As I understood, the issue lies in the conversion of String to Char (please correct me if I’m wrong), although I don’t understand how to do that.
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#include <RTClib.h>
#include <Wire.h>
#define HARDWARE_TYPE MD_MAX72XX::ICSTATION_HW
#define MAX_DEVICES 8
#define CLK_PIN D5
#define DATA_PIN D7
#define CS_PIN D8
// Hardware SPI connection
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
RTC_DS1307 RTC;
void setup(void)
{
Serial.begin(9600);
Wire.begin(4, 5); //SDA, SCL
P.begin();
RTC.begin();
}
void loop(void)
{
DateTime now = RTC.now();
Serial.println();
Serial.print(now.minute(), DEC); Serial.print(":"); Serial.print(now.minute(), DEC);
String Time = String (now.hour(), DEC); + ":" + (now.minute(), DEC);;
if (P.displayAnimate()) {
//P.displayText("Hello", PA_CENTER, 20, 20, PA_SCROLL_LEFT, PA_SCROLL_LEFT); // This works
P.displayText(Time, PA_CENTER, 20, 20, PA_SCROLL_LEFT, PA_SCROLL_LEFT); // Doesn't work
}
}
Please someone help me resolve this issue.
Thanks.