I went and got a new potentiometer and hooked it up to the 5v on one side, ground on the other and the wiper to the A0 pin. AND IT WORKED!!! It did not shut off my Arduino. So it was a bad potentiometer.
Now I have a quick question about my code.From the Arduino tutorial on http://arduino.cc/en/Tutorial/ReadAnalogVoltage it shows that when using a 10k ohm potentiometer you would use 1023 to divide the voltage by.
int sensorValue = analogRead(A0);
float voltage = sensorValue * (5.0/1023.0);
Is this right??
Thanks.
Stephen