|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Joystick issues
You're obviously thrashing around without a good idea of what the original robot program did or where you need to end up.
Stop. Save your work and set it aside. Start over with a fresh default robot project. Don't change anything except to make sure the Open 2 Motor Drive function is using the same PWM outputs the left and right motors are connected to. Invert either the left or the right motor if the robot doesn't drive forward when you push the joystick forward. If you aren't able to make it drive properly by just defining those few things, ask for help again. Only after you have the drive motors working the way you want them to should you start adding other things like additional motors, solenoids, etc. |
|
#2
|
|||
|
|||
|
Re: Joystick issues
Quote:
[IMG] [/IMG] |
|
#3
|
|||||
|
|||||
|
Re: Joystick issues
I'm afraid not. You're still sending different commands to each motor in multiple places. You're "using" the Arcade Drive function in a completely inappropriate way. It won't run anyway, because you haven't given it the inputs it requires.
I'm serious -- it's going to be much, much easier to throw away what you have and start over than it would be to try to correct it. Really. Just make a new Arcade Drive robot project, make sure the left and right motors are defined with the proper PWM channels, and be prepared to invert the right motor (or perhaps the left motor, depending on your gearboxes). |
|
#4
|
|||
|
|||
|
Re: Joystick issues
The problem with doing that is that we can't use an arcade drive with the robot because we can't use an open two motor, unless you have a way to make it work by assigning the same pwm twice(or some other way around that). We have both of our left motors wired through PWM 0 and both of our right motors wired through pwm 1. Which is what's making it so absolutely frustrating, we had it moving fine back when we weren't using a cable splitter and I could use open 2 motors with an arcade drive, but 2 of our pwm wires messed up so now we have no choice but to use a splitter.
|
|
#5
|
|||||
|
|||||
|
Re: Joystick issues
Yes it will work.
Create a new project and it will do what you want out of the box. Do not touch anything in the code. Keep your PWM splitters where they are. |
|
#6
|
|||
|
|||
|
Re: Joystick issues
Quote:
I've been working on this for 3 days and I just can't believe how stupidly simple this is. Thank you both so much for your help! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|