   }
   return sum;
 }
-
-#ifdef USE_NEOPIXEL
-void neopixelInit()
-{
-  neopixel.begin();   
-}
-#endif
-
-void neopixelSet(byte red, byte green, byte blue)
-{
-  #ifdef USE_NEOPIXEL
-    neopixel.setPixelColor(0, red, green, blue);
-    neopixel.show(); 
-  #endif
-}
-
-#ifdef USE_NEOPIXEL
-void neopixelLoop()
-{
-  long unsigned time = millis();
-}
-#endif
-

#define WIFI_SSID "ssid"
#define WIFI_KEY "wpakey"

// Uncomment this line if you would like to use a NeoPixel for status indication
//#define USE_NEOPIXEL
#define NEOPIXEL_PIN 9

//#define USE_XS1_SERVER
#define XS1_IP (10, 11, 10, 18)
#define XS1_URL "/control?callback=cname&cmd=set_state_sensor&number=9&value="
#define XS1_TIMEFRAME 2

  
  pinMode(TRIGGER_PIN, INPUT);
  
  #ifdef USE_NETWORK
    pinMode(4, OUTPUT);     // SD select pin
    digitalWrite(4, HIGH);  // Disable the SD port
