   } else {
     rightArm = false;
   }
-
-
-
-  //build JSON string
-  jsonString = "{\"type\":\"";
-  jsonString += type;
-  jsonString += "\",\"name\":\"";
-  jsonString += name;
-  jsonString += "\",\"leftArm\":\"";
   
-  jsonString += leftArm;
-  jsonString += "\",\"rightArm\":\"";
-  jsonString += rightArm;
-  jsonString += "\",\"back\":\"";
-  jsonString += back;
-  jsonString += "\"}";
-
-  //Print JSON to Serial if different
-  if (oldJSON != jsonString){
-    Serial.println(jsonString);
-    oldJSON = jsonString;
-  }
+  Serial.print(" - ");
+  Serial.println(rightArm);
 }

    back = backBentBack();
  }

  //add new data to the arrays
  prevBackData[counter] = back;
  prevLeftData[counter] = leftArm;
  prevRightData[counter] = rightArm;

  if (counter < 10){
    counter++;
  } else {
    counter = 0;
  }

  //collect # right
  for (int i = 0; i < 10; i++){
    if (prevBackData[i]){
      prevBackCount++;
    }
    if (prevLeftData[i]){
      prevLeftCount++;
    }
    if (prevRightData[i]){
      prevRightCount++;
    }
  }

void setup() {
  Serial.begin(9600);
  pinMode(buttonPin, INPUT);
  rightArmData = "fwd90";
}

//Run loop continuously
void loop() {
  Serial.print(armFwdRight90());
  Serial.print(" | ");
  Serial.print(analogRead(rShoulderPin));
  Serial.print(" | ");
  Serial.print(armFR90ShoulderVal);
  Serial.print(" | ");
  Serial.print(analogRead(rUnderarmPin));
  Serial.print(" | ");
  Serial.print(armFR90UnderVal);
  Serial.print(" | ");
  
  checkPosition();
  delay(500);
}


//Check if the position from json data is right
void checkPosition() {
