 int joyRightPin = 12;
 int joyFirePin = 13;
 
-// position tracking
-
-int updatedPos = 0;     // keeps track of the latest updated value of the MR sensor reading
-int rawPos = 0;         // current raw reading from MR sensor
-int lastRawPos = 0;     // last raw reading from MR sensor
-int lastLastRawPos = 0; // last last raw reading from MR sensor
-int flipNumber = 0;     // keeps track of the number of flips over the 180deg mark
-int tempOffset = 0;
-int rawDiff = 0;
-int lastRawDiff = 0;
-int rawOffset = 0;
-int lastRawOffset = 0;
-const int flipThresh = 700;  // threshold to determine whether or not a flip over the 180 degree mark occurred
-boolean flipped = false;
-
-// Kinematics
-double xh = 0;         // position of the handle [m]
-double lastXh = 0;     //last x position of the handle
-double vh = 0;         //velocity of the handle
-double lastVh = 0;     //last velocity of the handle
-double lastLastVh = 0; //last last velocity of the handle
-double rp = 0.004191;   //[m]
-double rs = 0.073152;   //[m]
-double rh = 0.065659;   //[m]
-// Force output variables
-double force = 0;           // force at the handle
-double Tp = 0;              // torque of the motor pulley
-double duty = 0;            // duty cylce (between 0 and 255)
-unsigned int output = 0;    // output command to the motor
+//// position tracking
+//
+//int updatedPos = 0;     // keeps track of the latest updated value of the MR sensor reading
+//int rawPos = 0;         // current raw reading from MR sensor
+//int lastRawPos = 0;     // last raw reading from MR sensor
+//int lastLastRawPos = 0; // last last raw reading from MR sensor
+//int flipNumber = 0;     // keeps track of the number of flips over the 180deg mark
+//int tempOffset = 0;
+//int rawDiff = 0;
+//int lastRawDiff = 0;
+//int rawOffset = 0;
+//int lastRawOffset = 0;
+//const int flipThresh = 700;  // threshold to determine whether or not a flip over the 180 degree mark occurred
+//boolean flipped = false;
+//
+//// Kinematics
+//double xh = 0;         // position of the handle [m]
+//double lastXh = 0;     //last x position of the handle
+//double vh = 0;         //velocity of the handle
+//double lastVh = 0;     //last velocity of the handle
+//double lastLastVh = 0; //last last velocity of the handle
+//double rp = 0.004191;   //[m]
+//double rs = 0.073152;   //[m]
+//double rh = 0.065659;   //[m]
+//// Force output variables
+//double force = 0;           // force at the handle
+//double Tp = 0;              // torque of the motor pulley
+//double duty = 0;            // duty cylce (between 0 and 255)
+//unsigned int output = 0;    // output command to the motor
 
 
 /*

#include <math.h>

/*
    DECLARATION

int32_t nextcall = 1000;
void loop() {
  // read the position in count
//  readPosCount();
//  calPosMeter();

  if(millis() > nextcall) {
    nextcall += 50;

	Serial.println(readJoystick()); // return joystick state
  }
  
