Arduino

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);
}
[Get Code]

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

- beginTFT()
- Text()
- drawBMP()

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

### This link has expired.
Please re-subscribe to our Newsletters.

### Subscribe to our Newsletters

Email

Please enter a valid email to subscribe

Arduino Newsletter
Arduino Store Newsletter

### Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy

###### Newsletter

- ©2015 Arduino
- Copyright Notice
- Contact us
- About us
- Careers