I am currently reading 2 values from the potentiometer (i.e. 2 * analogRead). The problem when I adjust the potentiometer the second value is also changed.
Switch to Poti 1: value 0 to 1023 and show me this on the serial monitor.
to potentiometer 2: change values from 0 to 1023 and the value of potentiometer 1 will also influence itself although they are connected separately.
Here below is the program code:
void HandlePot(void){
static int old_val_1=0;
int already_val_1;
static int old_val_2=0;
int already_val_2;
int current_1=analogRead(A2);
int current_2=analogRead(A9);
int current_x1= current_1 * 5 /1023;
int current_x2=current_2 * 5/1023;
It works in a virtual world: https://wokwi.com/arduino/projects/308062377567322690.
I had to change A9 to A7, because the simulation is still in development and only the first analog inputs seems to be implemented.
We like to know more.
You can draw a schematic on a piece of paper and make a photo of it. Or you can tell that it is the same as the simulation.
Can you show a photo ? Perhaps you use a breadboard. They have often bad contacts.
@ihebkebaier
I have deleted your other topic on the same subject. Posting twice on the same subject is against the forum rules because of the possibility of 2 different groups of volunteers spending their time trying to help, each unaware of what the other is doing. I kept this topic as it has the most replies.