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」和自上次重置以來經過的秒數,然後再次關閉。