新人刚入手开始学习,想实现一个字符闪烁的效果,但不知道那四条横线是从哪来的?
就在OK后面,应该能看清
代码如下
#include
#definebutton1A0
#definebutton2A1
#definebutton3A2
#definebutton4A3intKEY_NUM=0;//按键键值存放变量,不等于1说明有按键按下
LiquidCrystallcd(12,11,5,4,3,2);
voidsetup()
{lcd.begin(16,2);//初始化LCD1602lcd.print("Welcometouse!");delay(1000);//延时1000mslcd.clear();//液晶清屏pinMode(button1,INPUT_PULLUP);pinMode(button2,INPUT_PULLUP);pinMode(button3,INPUT_PULLUP);pinMode(button4,INPUT_PULLUP);
}
voidloop()
{lcd.setCursor(0,0);lcd.print("Exm1Exm2Exm3");lcd.setCursor(0,1);lcd.println("OK");lcd.setCursor(12,1);lcd.println("NO");delay(1000);lcd.setCursor(0,0);lcd.print("Exm2Exm3");lcd.setCursor(0,1);lcd.println("OK");lcd.setCursor(12,1);lcd.println("NO");delay(1000);
}
分 --> |