Go to Post We talked to a team in Las Vegas and next year there will be another team with a 25 drive train. The west coast may never be the same. - nuggetsyl [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 10 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #11   Spotlight this post!  
Unread 02-01-2011, 10:48 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Encoder with PIDController Help

Quote:
Originally Posted by mikets View Post
We are not using any encoders this year because we are using Mecanum wheels and our build head said the axle of the gearbox is too big to fit with the KOP encoders. But the beauty of the PID library is that it doesn't care what sensor you use. Since this year is pretty much line following. So we have a library module for line following drive which takes one PID controller that controls the heading while following the line. This PID controller for line following uses the three light sensors as input. In fact, we are planning to translate the light sensor readings into an integer with the following possible values: -2, -1, 0, 1, 2. Zero being right on the center of the line. 2 being too far to the right. Then this input value can be used as PIDGet() to calculate the error. So we can do the equivalent of:
Code:
lineFollower->SetTarget(float setPoint);
So we will call it with 0.0, telling it to maintain a reading of 0 (center of the line).
You can access the library here:
http://proj.titanrobotics.net/hg/Frc...03ad30f/trclib
Thanks! I'll take a look.

Mike
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Velocity-based PID with the WPILib PIDController Class Mr. Lim C/C++ 11 01-23-2010 03:06 PM
Can any one help us with programing the encoder to control the motor by ticks? Must Be Drama NI LabVIEW 4 02-09-2009 08:54 PM
Encoder Help with VEX and MPLAB qnetjoe Programming 5 03-11-2007 09:04 PM
Encoder code with hall effect sensors help brownster Programming 10 02-19-2005 09:23 AM
Need Help with Encoder - Won't Count Clicks Kingofl337 Programming 5 02-16-2005 06:30 PM


All times are GMT -5. The time now is 09:36 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi