 #define gRELEASE 2
 
 
-unsigned long session_id = 0xA90;
+unsigned long session_id;// = 0xA90;
 int clicks;
 gesture_t g = gNONE;
 // An IR LED must be connected to Arduino PWM pin 3.

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 || state == CONNECTED) {
    g = sliderEvent(&changes, 0);
    if (g!= 0)
      DEBUG_PRINTLN(g);
  }
  delay(10);
  return;
  
  switch(state) {
  case IDLE:
