How to convert x,y to motor speed1&2?
Posted: Wed Aug 09, 2017 6:05 am
Hi,
I'm trying to use a joy stick control the motors, I can get the input x,y(both values range from -100 to 100). Is there a way I can convert the x,y to motorspeed1 and motorspeed2 so the motor drive smoothly?
What I need is : when I push joystic forward x=0,y=100, both motor move forward with maximum speed, when I push joystick right x=100,y=0 robot turns right with left motor forward speed max and right motor backward speed max etc...
Thanks.
I'm trying to use a joy stick control the motors, I can get the input x,y(both values range from -100 to 100). Is there a way I can convert the x,y to motorspeed1 and motorspeed2 so the motor drive smoothly?
What I need is : when I push joystic forward x=0,y=100, both motor move forward with maximum speed, when I push joystick right x=100,y=0 robot turns right with left motor forward speed max and right motor backward speed max etc...
Thanks.