write()

描述

在液晶显示器上显示字元。

语法


lcd.write(data)

参数

data:要显示到液晶显示器上的字元

回传

byte:回传输出到液晶显示器上的字元数

范例

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  if (Serial.available()) {
    lcd.write(Serial.read());
  }
}

函式库参考主页面

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.