using four potentiometers with an arduino mega,and getting values on an lcd

Hi there,
would like to ask a few basic questions before i try out myself.

In order to get Position feedback from four ball valves which are servo driven , i would like to use four potentiometers to give me an analog read.These readings should be changed in to percentage,which should then sent to an hitachi lcd display.

The best i could do was find a code which uses two potentiometers,however without a percentage conversion

I will post the code next.

The question is if this code can be extended,so i can use two more pots

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7,8,9,10,11,12);

int potPin1 = A1;
int potPin2 = A2;

void setup()
{
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
lcd.clear();

pinMode(potPin1, INPUT);
pinMode(potPin2, INPUT);
}

void loop()
{
lcd.setCursor(0,0); // Sets the cursor to col 0 and row 0
lcd.print("SensorVal1: "); // Prints Sensor Val: to LCD
lcd.print(analogRead(potPin1)); // Prints value on Potpin1 to LCD
lcd.setCursor(0,1); // Sets the cursor to col 1 and row 0
lcd.print("SensorVal2: "); // Prints Sensor Val: to LCD
lcd.print(analogRead(potPin2)); // Prints value on Potpin1 to LCD
}

"get Position feedback from four ball valves which are servo driven "

What is driving the servos?

presently the four servos are being controlled by an arduino mega.

I would like to use two arduinos in the whole system,to avoid patching two different codes.

step4step:
presently the four servos are being controlled by an arduino mega.

Then have the other Arduino communicate the value over Serial or so - will be more accurate and saves modifying your servos.

I would like to use two arduinos in the whole system,to avoid patching two different codes.

Usually people prefer to use a single system to avoid patching two different codes.

would like to use two arduinos in the whole system,to avoid patching two different codes.

Typical beginners reaction. You have much more problems with two processors than you will have learning to do things properly in software.