User manual

return success;
}
The function configStation() has been called in the espConfig()-function. Here,
setting of the WLAN-mode to station mode with the command CWMODE and then
connection to the network via the CWJAP-command are performed. It can take
quite a long time until the connection is established. Therefore, the time-out is
briefly raised to 20 seconds here. If you prefer dual WLAN-mode, you can set
CWMODE to 3 here.
boolean configAP()
{
boolean success = true;
success &= (sendCom("AT+CWMODE=2", "OK"));
success &= (sendCom("AT+CWSAP=\"NanoESP\",\"\",5,0",
"OK"));
return success;
}
The function configAP() is not called here, but should be mentioned briefly any-
way. It is the counterpart to the configStation()-function, since it is used to set the
module to Access Point. A long time-out is not necessary here, since the module
can process the CWSAP-command much faster. In later tests, the espConfig()-
function instead of the
configStation() will be used to call the configAP()-function.
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(19200);