I think your problem is here:
you are reading the value of AN2, then storing in xCode:Adcin 2, x ' Read ADC value on AN2 (PORTA.2)
You should be storing in potval
And WELCOME to the forum!!
I think your problem is here:
you are reading the value of AN2, then storing in xCode:Adcin 2, x ' Read ADC value on AN2 (PORTA.2)
You should be storing in potval
And WELCOME to the forum!!
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks