1
我正在尝试使用Arduino Uno,三个按钮和一个ACM1602B-FL-YBW显示器进行岩石,纸张剪刀游戏。ACM1602B-FL-YBW在几秒钟后关闭
我在使用此显示器时只是做了一个简单的“Hello World”问题。
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12,11,10,7,6,5,4);
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通过的秒数在打印的“Hello World”复位,我应该看到柜台走下去,每一秒。
但我看到的只是“Hello World”和一个数字,一秒钟后就没有显示。
每次我重置,我再次看到“Hello world”和自上次重置以来经过的秒数,然后再次关闭。