这里会显示出您选择的修订版和当前版本之间的差别。
|
en:arduino:libraries:liquidcrystalwrite [2016/12/25 22:15] |
en:arduino:libraries:liquidcrystalwrite [2016/12/25 22:15] (当前版本) |
||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | [[en:arduino:libraries:liquidcrystal|LiquidCrystal]] | ||
| + | ====== write() ====== | ||
| + | |||
| + | ===== Description ===== | ||
| + | |||
| + | Write a character to the LCD. | ||
| + | ===== Syntax ===== | ||
| + | |||
| + | lcd.write(data) | ||
| + | ===== Parameters ===== | ||
| + | |||
| + | lcd: a variable of type LiquidCrystal | ||
| + | |||
| + | data: the character to write to the display | ||
| + | ===== Returns ===== | ||
| + | |||
| + | byte | ||
| + | |||
| + | write() will return the number of bytes written, though reading that number is optional | ||
| + | ===== Example ===== | ||
| + | <code cpp> | ||
| + | #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()); | ||
| + | } | ||
| + | } | ||
| + | </code> | ||
| + | |||
| + | [[en:arduino:libraries|Reference Home]] | ||