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

    Serial.println(iFk_offset);
    Serial.println(iBk_offset);
    
   
    //get time in milliseconds
    unsigned long currentMillis = millis();
  

  }

  if (readString.length() > 36){
    //see what was received
    Serial.println("The string is: " + readString);
    Serial.println(readString.length()); 
    
    //parse serial string into separate parameters
    amp = readString.substring(0, 3);
    knee_amp = readString.substring(3, 7); 
    afreq = readString.substring(7, 11); 
