 
 int previousMode(String mode) {
     int currentPattern = animations->previousPattern();
-    /*char currentPatternString[5];
+    char currentPatternString[5];
     sprintf(currentPatternString, "%i", currentPattern);
-    Particle.publish("Current Pattern", currentPatternString);*/
+    Particle.publish("Current Pattern", currentPatternString);
     return 1;
 }
 

    /*Serial.begin(11520);*/

    setupModeFunctions();
    // connectToRemote();

    spectrum = new SpectrumEqualizer();
    animations = new LEDAnimations(spectrum);

    // EVERY_N_MILLISECONDS(20) { animations->hueCounter++; } // slowly cycle the "base color" through the rainbow
}

void readColorFromRemote() {
   if(client.available()) {
     hueValue = client.read() << 8 | client.read();
     /*Serial.printlnf("Reading from remote: %d", hueValue);*/
   }
   while(client.read() != -1) {
     /*Serial.println("Shelf lost bytes");*/
   }
   client.flush();
   /*Serial.printlnf("Final from remote: %d", hueValue);*/
   animations->hueCounter = hueValue;
}

void connectToRemote() {
 if (client.connect(server, tcpPort)) {
     Serial.println("Connected");
     Particle.publish("Connected");
 } else {
     Serial.println("Connection failed");
     Particle.publish("Connection failed");
 }
}

void setupModeFunctions() {
  Particle.function("nextMode", nextMode);
