Hi,
-
Please post your code using the # button instead of as a quote, so that instances of things like [ii] don't dissappear as has happened in this case.
-
Are you using a common ground wire for both the actuator and the pot? I recommend that you dedicate one of the Arduino ground pins as "analog ground". Connect the ground side of the pot and any other sensors to analog ground, and use different ground pins for power and the ground sides of any outputs. That avoids ground currents of switched devices interfering with the value read by the ADC. However, the effect you are looking at is larger than I would expect from this cause.