Help please.

Hello guys

I’m looking for how to compose a code that displays the change of values of two pots in x and y axis.

For example, if I decrease the value of 1st pot, the value represents the negative of x axis. On the other hand, if I decrease the value of 1st pot, the value represents the positive of x axis

Same way with 2nd pot in y axis.

I tried to look for the code everywhere but most of explanations talked about pots with servo motors.

Basically I want to visualize the movement of arrows in keyboard with two pots.

Thank you for your help in advance.

For example, if I decrease the value of 1st pot, the value represents the negative of x axis. On the other hand, if I decrease the value of 1st pot, the value represents the positive of x axis

These two sentences seem to contradict each other.

kongithekong:
For example, if I decrease the value of 1st pot, the value represents the negative of x axis. On the other hand, if I decrease the value of 1st pot, the value represents the positive of x axis

Do you mean that the centre position of the pot represents 0 and moving one way increases the value and moving the other way decreases the value?

If so you need code like this

int potVal = digitalRead(potPin);   // range 0 to 1023
potVal -= 512;    // range -512 to + 511

...R

First, WELCOME to the forum.

Please read 'How to Use this Forum' it is a sticky post on the top of every forum.
need help with
it talks about useful subject lines. I can guarantee that anyone wanting to know about hoe to displays the change of values of two pots in x and y axis, will not be searching for a line like 'help please'

to fix, go to your first post, and on the bottom right is the other/modify, and put in a useful subject line like 'how to display changes of values from pots'