- #include <LiquidCrystal.h> //液晶庫
- LiquidCrystal lcd(8,9,10,4,5,6,7);//告訴該對象引腳配置
- void setup() {
- lcd.begin(16,2);//16:行的顯示位數; 2:顯示行數
- }
- void loop() {
- lcd.setCursor(0,0);//參數1:列的位置;參數2:行數 起始
- lcd.print("lcd test...");
- lcd.setCursor(0,1);
- lcd.print("haha...");
-
- }
復制代碼 |