We’re trying to program the joystick so that when it is pushed forward it goes forward, left it turns left, back back, and so on. we have the joystick to control the forward and reverse motion of the bot, but when we try to program it to be able to have it turn left or right it doesn’t work, it takes the forward/reverse motion and makes it so that when the joystick is pushed left or right it goes forward/reverse. how can we program it so that this issue doesn’t happen? we’re using LabVIEW for our programing.
many thanks from the Marinerds!
Below is the programing setup we are using that doesn’t seem to work
are you using a 2 or 4 wheel drive?
We are using two motors, with four wheels, the two motors being in the rear. While the front two wheels are free spinning.
ok. I think you are over thinking the drive system. When you open a new project in labview, open up to the begin.vi through team code menu. As default, it is set as a 2 motor arcade drive which is what you seem to what. It is also set to work with the joystick the way you want it to. You may have to work with it my changing the true and false values in the constants.
In your picture, it seemed you were trying to make two arcade drive that would do the same thing. Try what i said. Let me know how it goes.
Try opening the motors and joysticks once. You only need one Ref per actuator or sensor to which you can connect as many vi’s as you wish. Make sure you connect the y axis of the joystick to the y of the arcade drive, and the x axis of the joystick to the x of the arcade drive. Hope this helps.