Arduino Due potentiometer circuit not working

Should I modify my circuit, code, or is the Due defective?

  1. The posted circuit should work. Did you verify the voltage changes at the analog pin? Round wires plugged into header connectors designed for square pins can be problematic.

  2. Posted code does not compile but when the obvious mistakes are fixed, it should work. When in doubt, you can always test an analog input pin with the "AnalogInOutSerial" in the Examples->Analog selection in the IDE.

  3. That leaves a board hardware issue. Unlikely but anything is possible. Check the open circuit voltage on the analog pins, it should be less than 50mv which is just noise floating around. If it is stuck at 3.3 volts, the pin protection anti-static diodes have shorted, perhaps from being connected to 5V rather than 3.3?