Arduino C Code无效

时间:2017-11-09 02:30:12

标签: arduino lcd

// include the library code:
#include <LiquidCrystal.h>

const int rs = 13, en = 12, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
    // Print a message to the LCD.
    lcd.print("hello, world!");
}

void loop() {
    // Turn on the display:
    lcd.display();
    delay(500);
}

Arduino Board: enter image description here

我试了好几次,这对我不起作用。

我的结果是:

2 个答案:

答案 0 :(得分:0)

似乎是需要调整对比度的显示器?

顺便说一句:如果Arduino和显示器之间的连线正确,我不会检查你的照片。

答案 1 :(得分:0)

尝试将lcd.display()添加到您的设置中。