01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
| 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_send_cmd("AT+CWMODE=1","OK",50); //éèÖÃWIFI STAÄ£ê½
atk_8266_send_cmd("AT+RST","OK",20); //DHCP·tÎñÆ÷1رÕ(½öAPÄ£ê½óDD§)
delay_ms(1000); //Ñóê±3Sμè′yÖØÆô3é1|
delay_ms(1000);
delay_ms(1000);
delay_ms(1000);
//éèÖÃᬽóμ½μÄWIFIíøÂçÃû3Æ/¼óÃü·½ê½/ÃüÂë,Õa¼¸¸ö2ÎêyDèòa¸ù¾YÄú×Ô¼oμÄ·óéÆ÷éèÖýøDDDT¸Ä!!
atk_8266_send_cmd("AT+CIPMUX=0","OK",20); //0£oμ¥ᬽó£¬1£o¶àᬽó
sprintf((char*)p,"AT+CWJAP=\"%s\",\"%s\"",wifista_ssid,wifista_password);//éèÖÃÎTÏß2Îêy:ssid,ÃüÂë
while(atk_8266_send_cmd(p,"WIFI GOT IP",300)); //ᬽóÄ¿±ê·óéÆ÷,2¢Çò»ñμÃIP
|