【发布时间】: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