1.按鍵按下才會顯示一個界面,否則顯示另一個界面
問題:現在是在一個界面中不斷的刷新,這個問題怎么解決?
*********************/
void loop()
{
buttonState = digitalRead(buttonPin);
if(buttonState == HIGH)
{
Shuaxin_Init(); //刷新界面
Paint_DrawImage(gImage_4in3, 125, 0, 150, 150);
EPD_4IN2_Display(BlackImage); //調用圖像顯示
}
else
{
Shuaxin_Init(); //刷新界面
Paint_DrawString_CN(0, 0, udc ,&Font40CN,WHITE,BLACK); //背景
Paint_DrawString_CN(125, 0, udc0,&Font40CN,WHITE,BLACK); //顯示月和日
Paint_DrawString_CN(10, 66, udc1,&Font30CN,BLACK,WHITE); //顯示年份
Paint_DrawString_EN(10, 106,udc2,&Font20, WHITE,BLACK ); //顯示英文文字符
printf("EPD_Display1\r\n"); //串口打印數據
EPD_4IN2_Display(BlackImage); //調用圖像顯示
}
}
|