View Single Post
  #2   Spotlight this post!  
Unread 31-01-2014, 20:01
magnets's Avatar
magnets magnets is offline
Registered User
no team
 
Join Date: Jun 2013
Rookie Year: 2012
Location: United States
Posts: 748
magnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond reputemagnets has a reputation beyond repute
Re: Porportional rotation using gyro

The right way to do this is to fix the robot itself.

I would start by just trying proportional control. You don't actually need to use the PID controller class.

If you're using java/c++ with arcade drive, I'd do something like this to travel in a straight line.

drive.arcadeDrive(stick.getY(), kP*gyro.get()).

Make sure to have your code zero the gyro so that when the robot is on target, gyro.get() returns 0.