Arduino Mega 2560.
I am trying to display a variable in my GLCD.print.
String text1 = "Serial Input: " + result.serialin; // (the result.serial in is just junk text for the example)
myGLCD.setBackColor(0,0,0);
myGLCD.setColor(255,255,255);
myGLCD.print(text1, CENTER, 17);
The error:
Echo.ino: In function 'void loop()':
Echo:85: error: 'text1' was not declared in this scope
But text1 does not work. How can I do this?