YX ZHANG
/
iot_example
IoT demo
Fork of my_example_esp8266 by
Diff: esp8266.cpp
- Revision:
- 6:629e300b6c3b
- Parent:
- 3:06080fa094a0
- Child:
- 7:49a823b5a935
--- a/esp8266.cpp Wed Nov 15 06:12:24 2017 +0000 +++ b/esp8266.cpp Thu Dec 07 11:55:39 2017 +0000 @@ -22,8 +22,13 @@ //定义了一个调试的宏,C语言语法 #define ESP_CMD(format, ...) do{\ + char cmdbuf[128], *p;\ ser2esp8266.printf("\r"); \ - ser2esp8266.printf(format "\r", ##__VA_ARGS__);\ + sprintf(cmdbuf, format "\r", ##__VA_ARGS__);\ + for(p=cmdbuf;*p;p++){\ + ser2esp8266.putc(*p);\ + wait(0.05);\ + }\ wait(0.3);\ }while(0)