【问题标题】:16x2 LCD Interfacing with Arduino Uno16x2 LCD 与 Arduino Uno 接口
【发布时间】:2015-06-03 09:31:31
【问题描述】:

我通过以下连接将 Arduino 与 16x2 LCD 连接

我使用的程序

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

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() {
  // 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);
}

当我将我的 Arduino 连接到 LCD 并将程序上传到 Arduino 时,显示器工作并显示适当的输出。

现在,当我将 Arduino 与 USB 电缆断开(关闭电源)并重新连接(将其连接到电源)时,屏幕仅在顶行显示 BLACK BOXES。

我尝试将 Arduino 重新连接到电源,但它不起作用。我也尝试过重置 Arduino 板,但它不起作用。

我对 Arduino 进行了多次编程,但它只工作一次,并且在我断开电源时停止显示结果...

任何帮助将不胜感激

【问题讨论】:

    标签: android arduino-uno


    【解决方案1】:

    尝试在代码开头清除屏幕 lcd.clear 应该 wh

    【讨论】:

      【解决方案2】:

      我用一个新的替换了我在 Arduino 芯片上的 ATMEGA328P-PU。现在它可以工作了!

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-12-05
        • 2015-01-18
        • 1970-01-01
        相关资源
        最近更新 更多