If you try this sketch:
#include <WiFi.h>
#define SDBG Serial
// SERIAL 1 PINS
#define RX1_PIN 4
#define TX1_PIN 2
void setup()
{
#if SDBG == Serial1
SDBG.begin(115200, SERIAL_8N1, RX1_PIN, TX1_PIN);
SDBG.println("Serial1");
#else
SDBG.begin(115200,SERIAL_8N1);
SDBG.println("No Serial1");
#endif
}
void loop()
{
}
The output is always "Serial1". How can i test this with preprocessor?