Reference   Language | Libraries | Comparison | Changes

Robot

beginTFT()

Description

Initialize the TFT module. All general TFT functions are dependent on this.

Syntax

  • Robot.beginTFT()
  • Robot.beginTFT(foreGround, backGround)

Parameters

  • foreGround: set a universal foreground color. Default is black.
  • backGround: set a universal background color. Default is white.

Returns

none

Examples

#include <ArduinoRobot.h>

void setup(){
  Robot.begin();
  Robot.beginTFT();//Initialize the TFT module
}

void loop(){
  Robot.fill(255,255,255);
  Robot.text("Hello World",0,0);
  delay(2000);

  Robot.fill(0,0,0);
  Robot.text("Hello World",0,0,false);//It's necessary to erase the old text, before showing new text

  Robot.fill(255,255,255);
  Robot.text("I am a robot",0,0);
  delay(3000);

  Robot.fill(0,0,0);
  Robot.text("I am a robot",0,0);
}

See also

Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.