 
 ////////////////////////////////////////////////////////////////////////////////
 
-// if defined, use more straightforward serial output
-//#define DEBUG
-
 // send and receive messages using Bluetooth/Amarino as opposed to plain serial
-#define USE_BLUETOOTH
+//#define USE_BLUETOOTH
+
+// if defined, make serial output more legible
+#define DEBUG
 
 
 ////////////////////////////////////////////////////////////////////////////////

/*
 * Extend-o-Hand firmware, copyright 2013 by Joshua Shinavier
 * 
 * See: https://github.com/joshsh/extendo
 */

          state = STATE_ONE;
          
          // gesture event
#ifdef DEBUG
          // tab-separated format for the gesture event, for ease of importing to R and similar tools
          Serial.print((int32_t) micros()); Serial.print(",");
          Serial.print(amax); Serial.print(",");
          Serial.print(ax_max); Serial.print(",");
          Serial.print(ay_max); Serial.print(",");
          Serial.println(az_max);          
#else
          OSCMessage m("/exo/hand/raw");
          m.add((int32_t) micros());
          m.add(amax);
          m.add(ax_max);
          m.add(ay_max);
          m.add(az_max);
          sendOSC(m);   
#endif    
        }
        break;
    }
}


////////////////////////////////////////////////////////////////////////////////

