-
Notifications
You must be signed in to change notification settings - Fork 7
Intermediate API
Warren Gay edited this page Nov 17, 2015
·
1 revision
Rather than attempt to anticipate every new ESP command or user requirement, a low-level API allows you to easily interact with the ESP device in custom ways. Alternatively, the ESP8266 class can be extended.
bool commandok(const char *cmd)
The above command issues the command string followed by a CR LF. It returns when one of OK, FAIL or ERROR is received.
The following methods clear builtin flags used by the class receiving engine:
void clear_flag_ready()
void clear_flag_wifi_connected()
void clear_flag_got_ip()
void clear_flag_ok()
void clear_flag_fail()
void clear_flag_dnsfail()
void clear_flag_error()
Upon return from commandok(), you can test if the messages received set the flag of interest:
bool get_flag_ready() const
bool get_flag_wifi_connected() const
bool get_flag_got_ip() const
bool get_flag_ok() const
bool get_flag_fail() const
bool get_flag_dnsfail() const
bool get_flag_error() const