ESP8266 uart wifi module via AT command
Esp8266 Class Reference
Esp8266 WiFi serial module. More...
#include <Esp8266.h>
Public Member Functions | |
Esp8266 (PinName tx, PinName rx, PinName ch_pd, PinName rst, int baudrate=115200) | |
int | read_until (char *buf, int max, const char *p_ok="OK\r\n", const char *p_error="ERROR\r\n") |
Read data until match or reach max size return size of data -3: timeout -1: get error pattern. | |
int | cmd_data (const char *cmd, char *ret=NULL, int size=0, int timeout_ms=WIFI_TIME_OUT, const char *end="OK\r\n", const char *echo=NULL) |
every command has to end with "\r\n" |
Detailed Description
Esp8266 WiFi serial module.
Warnning: CH_PD pin has to connect VCC to boot from internal flash! Command has to end with "\r\n" If you can't get full AT output, set console same baudrate or higher, or set wifi baudrate low!!! DO NOT print console if you want get a long result from internet. Some bad data at beginning because the baudrate changed to 74880 : 0xd
: 0xa
Definition at line 29 of file Esp8266.h.
Constructor & Destructor Documentation
Esp8266 | ( | PinName | tx, |
PinName | rx, | ||
PinName | ch_pd, | ||
PinName | rst, | ||
int | baudrate = 115200 |
||
) |
Member Function Documentation
int cmd_data | ( | const char * | cmd, |
char * | ret = NULL , |
||
int | size = 0 , |
||
int | timeout_ms = WIFI_TIME_OUT , |
||
const char * | end = "OK\r\n" , |
||
const char * | echo = NULL |
||
) |
Generated on Thu Jul 14 2022 05:39:06 by 1.7.2