User manual
001
void setup()
002
{
003
// Open serial communications and wait for port to open:
004
Serial.begin(19200);
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 Commandos over serial Monitor
025
serialDebug();
026
}
Vengono trattate le funzioni più importanti presenti in quasi tutti i programmi. Nelle
note funzioni Arduino setup() e loop() ora vengono utilizzate queste funzioni. In
primo luogo, tuttavia, vengono inizializzate le due interfacce seriali con 19200