I'm trying to code a button on my touch screen that reads the time, but can also be touched and bring you to an edit time screen.
My code is fairly simple so far. imported UTFT libraries and Time.h and then only have this function running in the loop right now:
void drawToolbar() {
//Top Bar
mainDisplay.setColor(VGA_GRAY);
mainDisplay.fillRoundRect(0,0,319,28);
homeButton = inputButtons.addButton( 1, 212, 80, 26, "9", BUTTON_SYMBOL);
settingsButton = inputButtons.addButton( 81, 212, 79, 26, "w", BUTTON_SYMBOL);
alertButton = inputButtons.addButton( 160, 212, 79, 26, "W", BUTTON_SYMBOL);
powerButton = inputButtons.addButton( 239, 212, 80, 26, "4", BUTTON_SYMBOL);
timeButton = inputButtons.addButton( 160, 1, 158, 26, 34, "MM/DD/YYYY" + hour() + ":" + minute() );
inputButtons.drawButtons();
}
But I keep getting this error:
Toolbar.ino: In function 'void drawToolbar()':
Toolbar.ino:11:91: error: invalid operands of types 'const char*' and 'const char [2]' to binary 'operator+'
Can anyone help me out with this? Right now I simply want it to print the current time out. Once I get that, I'll work on having it constantly update without redrawing the whole screen each second.
I'm working on a Due
Thanks!