When they are turned to max or zero the circuit works fine but if I turn the Arduino on with the resistor in a mid position it freezes, I get the first reading but nothing else. It's connected through a waveshield but I can't see how that makes any difference. Any ideas what might be wrong. I don't have much code running yet, just this:
Wiring looks o'k for me. May be software, have you declared sensorValue as a global int? Are the limits- safety check of the input value in shifter.display function?
xolroc:
When you use A0 for a pin, that tells it to treat the pin as a digital input, though it refers to an analog pin. Just use analogRead(0).
This is not correct. analogRead() knows that A0 means Analog 0.
It is actually a better practice to use "A0" so it is very clear in your code that you intended to use Analog Input 0. Just using "0" could imply you meant digital 0 or analog 0.