ROBOTC.net forums
http://robotc.net/forums/

NeveRest Motors Accelerate/Decelerate
http://robotc.net/forums/viewtopic.php?f=1&t=10545
Page 1 of 1

Author:  marlin567 [ Tue Feb 17, 2015 8:36 pm ]
Post subject:  NeveRest Motors Accelerate/Decelerate

Hi RobotC Forums,

I am a member of an FTC Robotics team. For our robot, we built a scissor lift, the scissor lift jumps up at start up.
How would you code the scissor lift to accelerate at the start up.

Thanks

Here is the code below:

Code:
void scissorLift(int joy2btnA, int joy2btnB, int powerDown, int powerUp)
   {
      getJoystickSettings(joystick);
      if(joy2btnA == 1)
         {
            motor[sL1] = -powerDown;
            motor[sL2] = -powerDown;
         }
      else if(joy2btnB == 1)
         {
            motor[sL1] = powerUp;
            motor[sL2] = powerUp;
         }
      else
         {
            motor[sL1] = 0;
            motor[sL2] = 0;
         }
      }


This is my first POST!

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/