User manual
005
// set the data rate for the SoftwareSerial port
006
esp8266.begin(19200);
007
008
if (!espConfig()) serialDebug();
009
else debug("Config OK");
010
011
if (sendCom("AT+PING=\"www.google.de\"", "OK"))
012
{
013
Serial.println("Ping OK");
014
digitalWrite(13, HIGH);
015
}
016
else
017
{
018
Serial.println("Ping Error");
019
}
020
}
021
022
void loop() // run over and over
023
{
024
//Start serial Debug Mode - Type commands over serial Monitor
025
serialDebug();
026
}
The most important functions that you will find in nearly every program have now
been covered. These functions will now be used in the known Arduino functions
setup() and loop(). First, however, the two serial interfaces with 19200 Baud will be
initialised. Only then will the function espConfig() be called. In case of error, the
serialDebug()-function will be started at once. If everything went well, a success
message is sent. In later programs, the LED at Pin 13 that is marked with D3 on