View Single Post
  #7   Spotlight this post!  
Unread 15-02-2015, 15:40
RoboBucs RoboBucs is offline
Registered User
FRC #5005
 
Join Date: Jan 2015
Location: Chattanooga, TN
Posts: 69
RoboBucs is an unknown quantity at this point
Re: Use a button to make a motor move a certain number of rotations

Quote:
Originally Posted by Levansic View Post
You would put it as an input to the drive (where you have it), but you have to have the drive motors properly configured. One other thing, is that you need a little more logic to latch the value. The Teleop.vi runs approximately every 20 ms. As soon as you let go of the button, your input will be to drive the motor back to the 0 position. This isn't what you want.

If you intend to drive your robot completely with position commands, you will need a state machine that keeps track of the current values, incrementing and decrementing the intended position.

It is much easier to drive in speed or voltage mode.
It won't be completely, it's only with this specific arm, we can use joystick movement for it rather than buttons, it would just be easier for our driver to put a button and have the motors move that amount for that arm every single time. I also have 2 questions, what do you mean by speed or voltage mode and what's wrong with the way I have the drive motors configured? It's probably something stupid, I'm still used to using unbundle by name for buttons from last year rather than arrays, thank you so much for your help so far!
Reply With Quote