 /**
  * Emulate Philips Hue Bridge ; so far the Hue app finds the emulated Bridge and gets its config
- * but you cannot actually switch the NeoPixels with it yet (TODO)
+ * and switch on 3 NeoPixels with it so far (TODO)
  **/
 
 #include <ESP8266WiFi.h>
 #include <ESP8266WebServer.h>
 #include <WiFiUDP.h>
 #include "ESP8266SSDP.h"
-#include <NeoPixelBus.h>
+#include <NeoPixelBus.h> // NeoPixelAnimator branch
 #include <ArduinoJson.h>
 
 // The follwing is needed in order to fill ipString with a String that contains the IP address

}

void loop() {

  // FIXME: This seems to block everything while a request is being processed which takes about 2 seconds
  // Can we run this in a separate thread, in "the background"?
  HTTP.handleClient();
  SSDP.update();

  // Start animating the NeoPixels
  strip.StartAnimating();

  // Wait until no more animations are running
  // FIXME: This seems to block everything while a transition is running
  // Can we run this in a separate thread, in "the background"?
  while (strip.IsAnimating())
  {
    strip.UpdateAnimations();
    strip.Show();
    delay(31); // ~30hz change cycle
  }

  delay(1);
}


void rgb2xy(int R, int G, int B) {

  // Convert the RGB values to XYZ using the Wide RGB D65 conversion formula
  float X = R * 0.664511f + G * 0.154324f + B * 0.162028f;
  float Y = R * 0.283881f + G * 0.668433f + B * 0.047685f;

RgbColor black = RgbColor(0);
unsigned int transitionTime = 400; // by default there is a transition time to the new state of 400 milliseconds

NeoPixelBus strip = NeoPixelBus(pixelCount, pixelPin);
NeoPixelAnimator animator(&strip); // NeoPixel animation management object

/// X, Y, Z and x, y are values to desvribe colors
float X;
float Y;
