初级会员
- 积分
- 60
- 金钱
- 60
- 注册时间
- 2017-9-4
- 在线时间
- 5 小时
|
楼主 |
发表于 2017-9-29 16:34:35
|
显示全部楼层
根据我今天反复测试,void atk_8266_test(void)
{
// u16 rlen=0;
u8 key;
u8 timex;
POINT_COLOR=RED;
Show_Str_Mid(0,30,"ATK-ESP8266 WIFIÄ£¿é2aêÔ",16,240);
while(atk_8266_send_cmd("AT","OK",20))//¼ì2éWIFIÄ£¿éêÇ·ñÔúÏß
{
atk_8266_quit_trans();//íË3öí¸′«
atk_8266_send_cmd("AT+CIPMODE=0","OK",200); //1رÕí¸′«Ä£ê½
Show_Str(40,55,200,16,"Î′¼ì2aμ½Ä£¿é!!!",16,0);
delay_ms(800);
LCD_Fill(40,55,200,55+16,WHITE);
Show_Str(40,55,200,16,"3¢êÔᬽóÄ£¿é...",16,0);
}
while(atk_8266_send_cmd("ATE0","OK",20));//1رջØÏÔ
atk_8266_mtest_ui(32,30);
while(1)
{
delay_ms(10);
atk_8266_at_response(1);//¼ì2éATK-ESP8266Ä£¿é·¢Ëí1yà′μÄêy¾Y,¼°ê±éÏ′«¸øμçÄÔ
key=KEY_Scan(0);
if(key)
{
LCD_Clear(WHITE);
POINT_COLOR=RED;
switch(key)
{
case 1://KEY0
Show_Str_Mid(0,30,"ATK-ESP WIFI-AP+STA 2aêÔ",16,240);
Show_Str_Mid(0,50,"ÕyÔúÅäÖÃATK-ESP8266Ä£¿é£¬ÇëéÔμè...",12,240);
atk_8266_apsta_test(); //′®¿úòÔì«íø2aêÔ
break;
case 2://KEY1
Show_Str_Mid(0,30,"ATK-ESP WIFI-STA 2aêÔ",16,240);
Show_Str_Mid(0,50,"ÕyÔúÅäÖÃATK-ESP8266Ä£¿é£¬ÇëéÔμè...",12,240);
atk_8266_wifista_test();//WIFI STA2aêÔ
break;
case 4://WK_UP
atk_8266_wifiap_test(); //WIFI AP2aêÔ
break;
}
atk_8266_mtest_ui(32,30);
timex=0;
}
if((timex%20)==0)LED0=!LED0;//200mséá˸
timex++;
}
}
程序会运行红底字的语句三遍,所以会看到LCD显示的字闪三遍,但atk_8266_mtest_ui()函数内的atk_8266_msg_show(x,y+125,0); 后就不重复, |
|