Wiki
Clone wikiTFTConsole Library / Example Use - Serial Monitor
Use this example to send data to the screen only typing on the Serial monitor input! Remember to change the line feed to new line character! Go to the bottom, then you will see this: Click over, and change to new line:
So the code is:
#!Arduino #include "TFTConsole.h" //Console acts for us as a bridge between us and the TFT library. TFTConsole cout; void setup() { // put your setup code here, to run once: Serial.begin(9600); cout.init(); } int serialData = 0; String finale = ""; bool printing = false; void loop() { // put your main code here, to run repeatedly: if (Serial.available() > 0) { serialData = Serial.read(); if (serialData == 10){ printing = true; } else { finale += (char)serialData; } } if (printing) { cout.println(finale); finale = ""; printing = false; } }
Updated