Servo "Knob" sketch , trying to add 2nd servo

Hello all, First post , 3rd day playing with an UNO.
I have been going through some of the example sketches and have been having fun. It all seems to be going pretty well. I got to the Servo “Knob” sketch and it worked fine so I thought I would try adding a second servo. I am using small RC servos and one 5K pot and the second Pot is 10K I am not sure if that makes any difference. I first just changed the original code from analog pin 0 to 1 and from pwm pin 9 to 6, both servos work with their respective pots if they are the only ones in the sketch.
I started copying lines and redefining them.I have played quite a bit and can not seem to get them both to work properly. With the code below the pot on analog pin 1 controls both servos and the pot on pin 0 does nothing. I am pretty sure my problem is in the Loop() but cannot figure out how to define the variable to the separate servos.

Any help would be greatly appreciated .

Scott

/* 
 Controlling a servo position using a potentiometer (variable resistor) 
 by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> 

 modified on 8 Nov 2013
 by Scott Fitzgerald
 http://arduino.cc/en/Tutorial/Knob
*/

#include <Servo.h> 
 
Servo myservo0;  // create servo object to control a servo 
Servo myservo1;  // create servo object to control a servo
 
int potpin0 = 0;  // analog pin used to connect the potentiometer
int potpin1 = 1;  // analog pin used to connect the potentiometer
int val;          // variable to read the value from the analog pin 

void setup() 
{ 
  myservo0.attach(6);  // attaches the servo 0 on pin 6 to the servo object
  myservo1.attach(9);  // attaches the servo 1 on pin 9 to the servo object 
} 
 
void loop() 
{ 
  val = analogRead(potpin0);             // reads the value of the potentiometer (value between 0 and 1023)
  val = analogRead(potpin1);             // reads the value of the potentiometer (value between 0 and 1023) 
  val = map(val, 0, 1023, 0, 180);       // scale it to use it with the servo (value between 0 and 180) 
  myservo0.write(val);                   // sets the servo position according to the scaled value 
  myservo1.write(val);                   // sets the servo position according to the scaled value 
  delay(15);                             // waits for the servo to get there 
}
  val = analogRead(potpin0);             // reads the value of the potentiometer (value between 0 and 1023)
  val = analogRead(potpin1);             // reads the value of the potentiometer (value between 0 and 1023)

Read the first pot. Store the value in val.

Read the second pot. Store THAT value in vaL. Now how do you expect to get at the first value?

void loop() 
{ 
  // first pot and servo
  val = analogRead(potpin0);             // reads the value of the potentiometer (value between 0 and 1023)
  val = map(val, 0, 1023, 0, 180);       // scale it to use it with the servo (value between 0 and 180) 
  myservo0.write(val);                   // sets the servo position according to the scaled value 

  
  // second pot and servo
  val = analogRead(potpin1);             // reads the value of the potentiometer (value between 0 and 1023) 
  val = map(val, 0, 1023, 0, 180);       // scale it to use it with the servo (value between 0 and 180) 
  myservo1.write(val);                   // sets the servo position according to the scaled value 
  delay(15);                             // waits for the servo to get there 
}

jurs

You da man !!

After looking at it, it makes perfect sense......and works too!

Thank you very much

Scott