完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
需要的包和硬件 独立模块,es8266一个,c58266一个串口助手,pa.tv.org.eclipse.client.mqv33-1.2.0.jar的包 c51代码: #include void delay(unsigned int time); void connect_init(); void init(); char receive[]; int i; void send(char *date); ***it led1 = P1^0; char *p = "AT+CIPSTART=0,"TCP","192.168.4.2",5000rn"; char *q = "AT+CIPSEND=0,19rn"; char *cs = "hello workrn"; void main(){ init(); delay(500); connect_init(); send(p); delay(500); send(q); delay(500); send(cs); while(1); } void delay(unsigned int time){ while(time--); } //设置波特率9600 void init(){ SCON = 0x50; TMOD = 0x20; PCON |= 0x80; TH1 = 0xfa; TL1 = 0xfa; EA = 1; ES = 1; TR1 = 1; } //exp8266每次重启需要输入的值 void connect_init(){ char *a = "AT+CIPMUX=1rn"; char *b = "AT+CIPSERVER=1,8080rn"; while(*a!=' |