与Arduino的LCD接口

与Arduino的LCD接口,arduino,lcd,Arduino,Lcd,如何使用Arduino在LCD的两行上连续显示长文本 我试图使用Arduino在屏幕上显示串行数据,但我输入的句子在LCD的第一行之后被截断 基本上,要使用最常见的LCD,有: 示例代码是: LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // Here is the pinout of your LCD. Read the tutorial to understand what it means. void setup() { // Set up the

如何使用Arduino在LCD的两行上连续显示长文本


我试图使用Arduino在屏幕上显示串行数据,但我输入的句子在LCD的第一行之后被截断

基本上,要使用最常见的LCD,有:

示例代码是:

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // Here is the pinout of your LCD. Read the tutorial to understand what it means.

void setup() {
    // Set up the LCD's number of columns and rows:
    lcd.begin(16, 2);

    // Prints the first line which is 20 characters wide, padded with spaces, and the 'world!' will be on second line.
    lcd.print("hello,              world!");
}

void loop() {
    // Set the cursor to column 0, line 1 (note: line 1 is
    // the second row, since counting begins with 0):
    lcd.setCursor(0, 1);

    // Print the number of seconds since reset:
    lcd.print(millis()/1000);
}

在LCD上打印的任何内容都被视为一行。因此,要在两行上打印文本,需要在第一行中填充空格,直到达到该行的字符数。然后,以下所有文本将显示在第二行。

如果我们不知道您使用的是什么LCD,我们将无法帮助您。对于这个问题,这是一个更好的网站:我猜你还没有试着看LCD的数据表,因为这肯定会让你的答案给出你正在使用的LCD的类型,到目前为止你尝试编写了什么代码,你的LCD有多少个字符。。?