#define RXD2 16
#define TXD2 17
void setup() {
// Note the format for setting a serial port is as follows: Serial2.begin(baud-rate, protocol, RX pin, TX pin);
Serial.begin(115200);
//Serial1.begin(9600, SERIAL_8N1, RXD2, TXD2);
Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2);
Serial.println("Serial Txd is on pin: "+String(TX));
Serial.println("Serial Rxd is on pin: "+String(RX));
Serial.println("Serial Txd2 is on pin: "+String(TXD2));
Serial.println("Serial Rxd2 is on pin: "+String(RXD2));
}
void loop() { //Choose Serial1 or Serial2 as required
Serial2.println("DIR(1);");
delay(500);
Serial2.print("VER;\r\n");
delay(500);
Serial2.print("CLR(3);\r\n");
delay(500);
Serial2.println("DC16(50,70,'SunStudio Display',15);");
delay(500);
Serial2.println("DC24(30,46,' MCUCITY.0COM',15);\r\n");
delay(500);
// ("PL(0,0,50,50,1);\r\n");
// ("BOX(0,0,50,50,1);\r\n");
// // J. BOXF(x1,y1,x2,y2,c);Draw fill Square Frame command
// ("BOXF(0,0,50,50,1);\r\n");
// ("CIR(10,10,3,1);\r\n");
// // K. CIR(x,y,r,c); Drawing circle instruction
// // L. CIRF(x,y,r,c); Drawing fill circle instruction
// ("CIRF(10,10,3,3);\r\n");
// M. SBC(c);set the background color command
//
// ("SBC(1);\r\n");
Serial2.println("BTN(120,80,32,16,' Button',1,0,1,4);");
delay(500);
}