Attempting to make a simple code that gives the Voltage(V) of leg3 on my potentiometer (POT) (just a beginner ). However, when the POT reads near its min (0.1 ohm), my serial monitor reads 522 and at its max (10k), 1023. But, moving the pot from 0% to 85% of its range, returns 522 - 585, then instantly starts climbing to 1023 (586 -1023) for the remainder of its %.
Nothing is wrong with the breadboard or POT. Even tried using diff gnd pins, and A# pins. I put in the the code I used but I've already recoded it a few times. Does anyone know how to fix this situation or possibly explain what I'm doing wrong, it'd be greatly appreciated!
Please explain why you say that. You said you are a beginner (or at least I think that's what you meant to say, because I have never heard of a beginner pot).
Have you tried a different pot? Or a different breadboard? Or at least a different part of the breadboard.
Even though you haven't shared details of your wiring, I can immediately imagine a likely cause. You are using a breadboard with a non-breadboard-compatlble Arduino, a Mega. That forces you use use Dupont cables, and these are notorious for their unreliability. Have you tried testing out at least replacing each one you are using?
Does the breadboard have continuous power strips along its edges or do they have gaps in the middle ? If the latter then have you got connections to each side of the break ?
Sounds like you have a "volume control" pot with a logarithmic taper that more closely matches the non linear response curve of human hearing, a type "A" pot. Look at the back of the pot and post the lettering there (if any).
At one end of the track a small movement of the pot wiper will produce a small change in resistance whilst at the other end of the track the same size of movement will produce a much larger change in resistance