Differentiate serial begin if arduino

This commit is contained in:
1technophile committed 2017-09-17 22:12:16 +02:00
1 parent 4e25b1f7ea
commit 0025d60e9c
1 file changed
+3 -2
+3 -2
View File
@@ -119,10 +119,9 @@ void callback(char* topic, byte* payload, unsigned int length) {
void setup() void setup()
{ {
#ifdef ESP8266
//Launch serial for debugging purposes //Launch serial for debugging purposes
Serial.begin(SERIAL_BAUD, SERIAL_8N1, SERIAL_TX_ONLY); Serial.begin(SERIAL_BAUD, SERIAL_8N1, SERIAL_TX_ONLY);
#ifdef ESP8266
//Begining wifi connection in case of ESP8266 //Begining wifi connection in case of ESP8266
setup_wifi(); setup_wifi();
// Port defaults to 8266 // Port defaults to 8266
@@ -153,6 +152,8 @@ void setup()
}); });
ArduinoOTA.begin(); ArduinoOTA.begin();
#else #else
//Launch serial for debugging purposes
Serial.begin(SERIAL_BAUD);
//Begining ethernet connection in case of Arduino + W5100 //Begining ethernet connection in case of Arduino + W5100
setup_ethernet(); setup_ethernet();
#endif #endif