hello guys,
i need to know please why does a potentiometer value change even if i turned it into the max which should be 1023 ?
what i am doing here is just testing, so i programmed a simple potentiometer program with serial connection to view the variable on monitor so it's giving me once 1023 , one 0, once 775 ... why ?
Perfect
Bingo, perfect, perfect. This is why we test things by themselves before we try to put together a big project. Getting this pot to work will be important when added to a bigger project.
Ok, I would assume this is probably just a “messy” set-up. This feels like a loose wire rattling around in a breadboard to me. I can also assume the pot itself is a pretty cheap one (nothing against you, they are all cheap).
I would reconnect everything using fresh holes in your breadboard --Breadboard contacts can get spread out when larger parts are used. When a smaller one goes in later, it can lead to a loose contact.
If you can, solder some jumper wires directly to the pot.
All in all, this feels like a dirty connection somewhere, maybe some junk inside the pot. Tidy up, snug up your wires, try a different pot if you have one, see if you can get some better numbers.
exactly !! it’s because the
exactly !! it’s because the breadboard nevertheless it’s new one !! when i plugged the potentiometer directly to the arduino it works without giving me the 0 value when it’s on the maximum !!