#include #include //#include #include // 2.9" b/w #include #include #include GxIO_Class io(SPI, /*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16); // arbitrary selection of 17, 16 GxEPD_Class display(io, /*RST=*/ 16, /*BUSY=*/ 4); // arbitrary selection of (16), 4 void setup() { // put your setup code here, to run once: // setup the display Serial.begin(115200); display.init(115200); // colours are good. display.fillScreen(GxEPD_WHITE); display.setTextColor(GxEPD_BLACK); display.update(); // load a font - in the library display.setFont(&FreeMonoBold9pt7b); display.setCursor(0, 0); display.println(); display.println("hello"); display.update(); } void loop() { //addresses String line1="@1"; String clearLCD="@C"; //Collect serial information in a string String input=""; if (Serial.available()){ input=Serial.readString(); delay(100); //if string begins with 1@ print on line 1 if (input.startsWith(line1)){ input.remove(0, 2); display.setCursor(0, 0); display.println(); display.println(input); display.update(); } //clear the LCD if (input.startsWith(clearLCD)){ display.fillScreen(GxEPD_WHITE); display.setTextColor(GxEPD_BLACK); display.update(); } } }