Had a similar situation in the past. Check for some noise to your analog input pin. You will find that on a fast oscilloscope the level on the signal is not steady but in the form of a waveform. Find ...
in my attempt to dynamically create a list of custom structures representing messages to be sent out, i wrote this piece of code. I defined a struct List and a struct Message ...