I am reading from analog pin 0. When I feed 5v in from the source voltage I get 1023 read within my code. I can take a simple resistive voltage divider and correctly read the voltage with the ADC.
Now, I take an opamp output of 4.7 volts and feed it in directly. I read 4.7 volts on the physical pin, but I am getting way too low a value within the code. In fact, I am reading a value less than 0.5v if I convert the adc value back to a voltage. Is there a problem taking the output of the opamp? Should I use a voltage follower? Should I put a capacitor in there. This is some circuit issue, but I am unsure which way to go.