View Single Post
  #29   Spotlight this post!  
Unread 15-02-2008, 23:18
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: Potentiometer PID

Quote:
Originally Posted by Mike AA View Post
I guess I am comfused and I have been trying to get an idea on all this. I wish to be able to move the joystick to say a value of 200, then I want on the robot a motor to turn an arm until it also reads another pot at the same angle.

Example:
Joystick tilted slightly forward, thus arm tilted slightly down.

I cant figure out do I use a PID loop or do I just get creative with some other code or use a table? In the past I would just use limit switched but II want better control this year and a more varied location.

-Mike
Do a simple proportional control...

Code:
arm_motor = (arm_pot - p1_y) * 50;
dont multiply by 50, multiply by something that actually makes the arm move smoothly.
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY