pot value

Also printed out serial.read and it seems all it reads is -1 for awhile then seems like a continuous loop of numbers without the pot even moving.

  val = analogRead(potPin); // read the value from the pot
  Serial.print(val); //sends 1 byte

Well, duh! And, you comment is wrong. Very wrong.

  int value = Serial.available();
  Serial.println(value);

So, a number appears in the serial monitor. What does that number mean?

      if(var=='<') //not sure what to put in if statement to run until end
      {
        started = true;
<snip>
      else if(var=='>')
      {
        ended = true;
<snip>
      else if(started)
      {
        string[index]=var;

Might be worth having the sender actually send a < and a > if you expect the receiver to receive them.