View Single Post
  #9   Spotlight this post!  
Unread 13-02-2011, 21:51
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: Acceleration based on position

I tried implementing Mark's example and my encoder into the code, and got this: http://img687.imageshack.us/img687/4504/photodtz.jpg (sorry for the bad screenshot).

There is a (-x) on Joystick 2 axis 2 because going forward gives -1 for some reason, and we have no clue how to calibrate the logitech attack 3 joysticks. It shouldn't change anything in the code, right?

When I deployed this and clicked enable on DS, the elevator suddenly started moving up, and about halfway, it started jerking down and up. By then I rushed to click disable, but no one was moving the joystick during the deployment. Why did the elevator start moving on its own? Since the joystick wasn't moving, its value was 0, and the encoder reset its value to 0 when I clicked enable, so it shouldnt move, right?

Or did I miss something while coding the PID? (Wasn't really sure what the 3,0,0 for PID meant in mark's code, so I just tried using 1 and keeping it simple).
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award

Last edited by umangv620 : 13-02-2011 at 21:53.
Reply With Quote