Hello. I am working on a two-motor joystick controller (pan/tilt)
I have the design working with two potentiometer joystick. This will need to be switched over to a hall effect, but doing baby steps.
What I am needing help with is right now the joystick works by a variable speed as the joystick is used, like normal. I have two switches I need to adjust the speed as well.
So in switch1(A2), I want the motors to turn at one speed, but have the joystick control the direction (forward/reverse) but not the speed, I want to be able to define the speed when switch 1 is high, or Vcc. then have it operate a different speed when switch 2 (A3) is high, or Vcc.
I have enclosed a .docx file that shows the schematic and code.
Please repost your schematic and code as an image and in code tags respectively.
You should checkout the how-to-post sticky threads. .docx is a potential virus/trojan threat,
so savvy users will never open such a file from an untrusted source, and sume users can't open such a file, nor would they bother.
michaelsandborn:
What I am needing help with is right now the joystick works by a variable speed as the joystick is used, like normal. I have two switches I need to adjust the speed as well.
So in switch1(A2), I want the motors to turn at one speed, but have the joystick control the direction (forward/reverse) but not the speed, I want to be able to define the speed when switch 1 is high, or Vcc. then have it operate a different speed when switch 2 (A3) is high, or Vcc.
I can't make sense of your requirement.
The code in Reply #2 seems to control the direction and speed of the motors according to the position of the joystick - is that what actually happens?
Are you saying that you just want to use the joystick to control the direction and that you propose to control the speed with some button switches that are not now in the code in Reply #2?
If so, it seems to me you already have the code for direction control by joystick so what is it that you want help with?