Post your code. There's nothing we can do without the code. We have no idea what you are talking about without a link.
That's a simple voltage divider. Post a schematic for that. (Draw the schematic on a blank sheet of printer paper and take a photo and post the photo)