print()
描述
在液晶显示器上显示文字。
语法
lcd.print(data)
lcd.print(data, BASE)
参数
data:要显示在液晶显示器上的资料,型态可为 char, byte, int, string
BASE (非必要):BASE 用来指定资料的格式;可用的格式有:BIN (二进位格式)、OCT (八进位格式)、DEC (十进位格式)、HEX (十六进位格式)
回传
byte:回传输出到液晶显示器上的字元数
范例
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
void setup()
{
lcd.print("hello, world!");
}
void loop() {}
The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
