 #define TEMP_SENSOR D6
 #define PH_ADDRESS 99
 #define ORP_ADDRESS 98
+
+// Set external antenna (remembered after power off)
+STARTUP(WiFi.selectAntenna(ANT_EXTERNAL));
 
 DS18B20 ds18b20(TEMP_SENSOR);
 double celsius;

double pH = 0;
double ORP = 0;
double soc = 0;

void setup() {
  Serial.begin(9600);

  Particle.function("calibrateORP",calibrate_orp);
  Particle.function("check",check_calibrated);
  Particle.function("slope",check_slope);
  Particle.variable("wifi",wifi);

  nextSleepTime = millis() + WAKE_INTERVAL;
}
