+/*
+This is a program that recieves sine wave parameters from a serial connection in a single string.
+The string is parsed and converted into numbers, which are plugged into 8 sine equations to generate
+positions for each joint of the robot.
+*/
+
 #include <Servo.h>
 
 Servo SB, SF, HB, HF, EB, EF, KB, KF;
-int iAmp, iF_offset, iB_offset, iFk_offset, iBk_offset, pos[] = {0,1,2,3,4,5,6,7};
+int pos[] = {0,1,2,3,4,5,6,7};
 unsigned int t = 0;
 unsigned long previousMillis = 0;
-float fKnee_amp, fAfreq, fPhase, fGait;
 
 void setup(){
   //Start serial stream at 115200 baud

    Serial.println("Fk Offset: " + fk_offset);
    Serial.println("Bk Offset: " + bk_offset + "\n");
    */
    iAmp = amp.toInt();
  
    knee_amp.toCharArray(buffer, 10);

    bk_offset="";
  }
  
  //if the joints should be oscillating
  if (fAfreq > 0){
    //determine joint positions
    pos[0] = iAmp * sin(fAfreq*t) + 1500 + iF_offset;
