 |
 |
 |
 |
| Name |
|
print()
|
 |
|
|
| Examples |
|
#include <LiquidCrystal.h>
LiquidCrystal myDisplay = LiquidCrystal(0,1,2,2);
void setup()
{
}
int a = 0;
void loop()
{
myDisplay.clear();
myDisplay.home();
myDisplay.print("Variable a is: ");
myDisplay.setCursor(16, 0);
myDisplay.print(a);
a = a + 1;
delay(200);
}
|
|
|
| Description |
|
The print() method writes data to the display. This is often helpful for looking at the data a program is producing or just to write data to a display connected to the Wiring I/O board. The companion method println works like print, but sends a new line character for each call to the function. Data can either be a single int, byte (BYTE), long, char, char[], or a number in decimal (DEC), hexadecimal (HEX) , octal (OCT), or binary (BIN) base.
|
 |
|
|
| Syntax |
|
display.print(data)
display.print(data, base)
|
 |
|
|
| Parameters |
|
| data
|
|
int, long, byte, char, char[] or String
|
| base
|
|
BYTE, DEC, HEX, OCT or BIN
|
| display
|
|
The LiquidCrystal object
|
|
 |
|
|
| Returns |
|
None
|
 |
|
|
| Usage |
|
Application
|
 |
|
|
|