Make my motor turn left and right

Hi, I have build a wheelchair and the motor act like master and slave. So The slave motor will receive signal from the master wheel. I would like to know how can I write my code in order to let them turn left and write. I am using the VESC controller. Thank you

You will need to provide a great deal more information.

And a diagram would probably help.

...R

I actually adapted the idea of electric skateboard but modify it to electric wheelchair. So based on the coding I have, I can only let it to move forward and backward. Then now I am trying to think of how to let the motor turn left and right.

codingnoob:
I actually adapted the idea of electric skateboard but modify it to electric wheelchair. So based on the coding I have, I can only let it to move forward and backward. Then now I am trying to think of how to let the motor turn left and right.

Well, if you have two wheels, you turn left and right by turning one wheel forward and the other wheel backwards.

I have build a wheelchair and the motor act like master and slave. So The slave motor will receive signal from the master wheel.

That sounds like a very odd arrangement. Why not control the speed and direction of each motor individually ?

Then now I am trying to think of how to let the motor turn left and right.

Look at your motor. Can it distinguish left from right? Can it ACTUALLY turn right? No. It can ROTATE - clockwise or counterclockwise.

Describing what you want to have happen in terms that match reality is going to be necessary before you can get help here.