It would seem to me that, in your research, you should have found analogRead() somewhere during the search. Second, please read the post at the top of this Forum by Nick Gammon on the proper way to post source code here using code tags. Finally, while researching analogRead() you may want to investigate map(), too.