Smoothing AnalogRead

Are you trying to smooth these two readings ?

analogRead(potPinL)
analogRead(potPinA)

If so, this could be a candidate for a hysteresis solution. Look here and the latest code in post #25.

How much instability are you seeing on your analog reading in the range 0 to 1023. Is it +/- 5 Analog units or +/-10 Analog units or what ?.