View Single Post
  #2   Spotlight this post!  
Unread 02-02-2013, 15:55
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 181
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
Re: Encoders and Motors

Your problem is probably that the encoder does not measure in degrees. An encoder measures ticks per second, which is more suitable for measuring speed and distance than measuring angles.

I think your main problem, though, is that you're getting your current angle by dividing your Distance reading by 360 and taking the remainder. The Distance output will probably read something like inches or feet, depending on how you configured the encoder in Begin.vi. I would just experiment with different positions and find a more appropriate setpoint and process variable.

Or, if you really want to work with angles, you could try mounting a gyro sideways on your ramp. I don't think that's your best option, though.
Reply With Quote