|
- char Mode = 0;
- void loop()
- {
- buttonState = digitalRead(buttonPin);
- if(buttonState == HIGH)
- {
- if(Mode!=1)
- {
- Mode=1;
- Shuaxin_Init(); //刷新界面
- Paint_DrawImage(gImage_4in3, 125, 0, 150, 150);
- EPD_4IN2_Display(BlackImage); //調(diào)用圖像顯示
- }
- }
- else
- {
- if(Mode!=2)
- {
- Mode=2;
- 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"); //串口打印數(shù)據(jù)
- EPD_4IN2_Display(BlackImage); //調(diào)用圖像顯示
- }
- }
- }
復(fù)制代碼
|
|