 bool pressed;
 unsigned long end_time;
 
-int readXBeeString (char *strArray) {
-  int i = 0;
-  if(!XBee.available()) {
-    return -1;
-  }
-  while (XBee.available()) {
-    strArray[i] = XBee.read();
-    i++;
-  }
-  strArray[i] = '\0';
-  return i;
-}
-
 void setup()
 {
   Serial.begin(9600);
   state = IDLE;
-  Serial.println('System Begins!');
   digitalWrite(softpotPin, HIGH); //enable pullup resistor
   randomSeed(analogRead(5));
   digitalWrite(ledPin, LOW);

  // monitor the user input all the time
  // so everytime when loop executes, or at least in some states
  // we will see the results
  if (state == IDLE) {
    g = sliderEvent(&changes, 0);
    if (g!= 0)
      DEBUG_PRINTLN(g);
  }
  
  switch(state) {
  case IDLE:


#define DEBUG
#include "utils.h"

SoftwareSerial XBee(2, 4); // RX, TX

