 #include <FFT.h> // include the library
 //#include <prescaler.h>
 
+//DEFINE ACCELEROMETER PINS IN CASE WE NEED THIS LATER
+//int sensorZ_pin = A0;
+//int sensorY_pin = A1;
+//int sensorX_pin = A2;
+//int sensorZ = 0;
+//int sensorY = 0;
+//int sensorX = 0;
+
 int digitalSelectPin = 2;
 int digitalSleepPin = 3;
-
+String data;
 
 // Define various ADC prescaler variables
 const unsigned char PS_32_i = 0xe5; //Chosen Prescaler -> 32

int peak_power[FFT_N/2];

//State Data
int mic_or_zxy_state = 0; //There are 4 possible states from 0-3: Microphone = 0; Vibration X = 1; Vibration Y = 2; Vibration Z = 3;
int down_sampling_counter = 0;
int down_sampling_rate = 1;

//Print Variables
String data_string = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";

///////////////////////////////////////////////////SETUP////////////////////////////////////////////////////////
void setup() {
  mySerial.begin(4800);
  data_string="";
  pinMode(digitalSelectPin, OUTPUT);
  digitalWrite(digitalSelectPin, LOW); //Set to HIGH for 6G sensitivity, OR LOW for 1.5G sensitivity
  digitalWrite(digitalSleepPin, HIGH);
  Serial.begin(9600); // use the serial port
  TIMSK0 = 0; //Reduces jitter
  ADCSRA = PS_32_i; //Set Prescaler Value
  ADMUX = 0x40; // use adc0

  while(1) { // reduces jitter

  //DEBUG
  if(is_microphone==true){
    Serial.print("Microphone running");
  }else{
    Serial.print("Vibration running");
  }
  
    
    cli();  // UDRE interrupt slows this way down on arduino1.0
