Low pin voltage

Hello, in designing my project i have ran into a problem with an output pin. It will only give me 12mV. This is just testing to add to the main code, ultimately it will fill a bottle with water after a potentiometer reaches a certain level and cut off at another. As well, it will sound an alarm if it reaches to low. The potentiometer is a 10Kohm slide, as for now I'm trying to get it to light up two resistors. The code I am using now:

int MotorPin = 13;
int LedLOW = 12;
int voltage;

void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
pinMode(MotorPin, OUTPUT);
pinMode(LedLOW, OUTPUT);

}

void loop()
{
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
// print out the value you read:]
Serial.println (voltage);

if ( voltage > 4.5 )
{
digitalWrite(MotorPin, HIGH);
digitalWrite(LedLOW , HIGH);
}
else if (voltage < 4.5 && voltage > 2)
{
digitalWrite(MotorPin , HIGH);
digitalWrite(LedLOW, LOW);
}
else (voltage <=2);
{
digitalWrite(MotorPin , LOW);
digitalWrite(LedLOW, LOW);
}
}

I think it is somewhere in the code. i could be wrong, relatively new to programming. Ultimately this arduino is the "emperor" one pic16f88 "master" and 2 other pic16f88 are "slaves".

Thanks for your time.

else (voltage <=2);
Should be:
else if (voltage <=2); or just else

How is your pot wired?

Just like this but in the analog input 0.

else (voltage <=2);
Get rid of the ;

Plug the blue wire into A0, not A2 :wink:

Yes, get rid of the ";", missed that :grin:

Thank you LarryD, and outsider. combined the two and viola. Now just incorporating this to the touchscreen communications, and pic16f88 comms and handshakes. Again thank you, hopefully this will be the last post for this project.