Mcufriend 2.4" LCD TFT Console Library

Hello arduino users! This is my very first topic here on arduino (perhaps i've been playing with arduinos for years).
Recently I have written a library that acts as a "wrapper", "interface" or whatever for the modified version of the adafruit libary (for LCD TFT Screens).
First of all, many thanks to "Mole Android" for providing the library. (In fact, I bought the screen like half year ago, and NOW, finally, is working). Links to the original sources of the library at the bottom.


TFT Console Library

BEWARE! Since the library is in "beta", there are many functions that act as fake placeholders and they may do not cause effect. Even, if you change the font size, it can cause to not show correctly the text.

So, the library itself provides a class called TFTConsole, which it is ready to use with the Mcufriend 2.4'' LCD TFT Screen.

The use is simple: Just create a TFTConsole object, and use it as a console output, like if you were using Serial comunication.

Below there's an example of the simplest use:

#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();

  cout.println("Hello world!");
}

int count = 0;
void loop() {
  // put your main code here, to run repeatedly:

}

Edit:

Here's an example with serial com.

With this example program you can send single lines of text to the screen directly with the Serial monitor

#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;
  }
}

Here's the link to bitbucket wiki (For syntax highlighting):
Go to bitbucket!

Remember to change the line feeding to "New Line"!!

As you can see, the cout.println("some text"); acts like Serial.println("whatever");


The source in bitbucket (Is like github):
Go to the source code page

A zip containing the library ready to use:
Download the library

Installation: Just drop the folder inside the .zip file in "documents/Arduino/libraries/".
Remember to include TFTConsole.h


Links for the original source of the libraries that i have used there:
Youtube video from the source
The download source