Reference   Language | Libraries | Comparison | Changes

Robot

debugPrint()

Description

Print and refresh a value to the LCD screen. You need to first initialize the LCD screen in setup() by calling Robot.readyLCD(). If no starting point is defined, text defaults to starting at 0,0, the top left of the screen.

Syntax

  • Robot.debugPrint(toPrint)
  • Robot.debugPrint(toPrint, x, y)

Parameters

  • toPrint: value to be printed. Must be int or long.
  • x: x axis of starting position on the screen.
  • y: y axis of starting position on the screen.

Returns

none

Examples

#include <ArduinoRobot.h>

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

void loop(){
  int val=Robot.analogRead(TK0); //Get analog value from port TK0 on top board.
  Robot.debugPrint(val); //No need to erase the old value
  delay(100);
}

Note

This is essentially a wrapper around Robot.text() by printing and erasing a single variable. Use it as a convenient way of checking a value without serial monitor. It can only display one variable. Don't move the cursor when using debugPrint().

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.

Share