完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
esp8266+c51编程问题,在WIFI_Init()里面用printf就好使,用自己写的ESP8266_Set()就不好使 求大神赐教!!!!!!! #include #include #include char Recive_table[20]=""; //鐢ㄤ簬鎺ユ敹wifi妯″潡鍙嶉?鍒癕CU涓婄殑鏁版嵁 char Recive_state = 0; void ms_delay(int t) { int i,j; for(i=t;i>0;i--) for(j=110;j>0;j--); } void us_delay(char t) { while(t--); } void LED(void) { P1 = 0; ms_delay(100); P1 = 0xff; ms_delay(100); } void WIFI_Init(void) { ti = 1; //ESP8266_Set("AT+RST"); printf("AT+RSTrn"); LED(); ms_delay(1000) ; //ESP8266_Set("AT+CWMODE=3"); printf("AT+CWMODE=3rn"); LED(); ms_delay(1000) ; //ESP8266_Set("AT+CIPMUX=1"); printf("AT+CIPMUX=1rn"); LED(); ms_delay(1000) ; //ESP8266_Set("AT+CIPSERVER=1,8080"); printf("AT+CIPSERVER=1,8080rn"); LED(); ms_delay(1000) ; while(!TI); TI = 0; ES = 1; } void Send_Uart(char value) { ES=0; //关闭串口中断 TI=0; //清发送完毕中断请求标志位 SBUF=value; //发送 while(TI==0); //等待发送完毕 TI=0; //清发送完毕中断请求标志位 ES=1; //允许串口中断 } void ESP8266_Set(char *puf) // 数组指针*puf指向字符串数组 { while(*puf!=' |