Go to Post Part of FRC is to introduce you to how engineering is in real life: you can't use a redo card if you're landing something on the moon. - The other Gabe [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: 6 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-02-2013, 12:37
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 495
tomy has a spectacular aura abouttomy has a spectacular aura about
PID + Battery Voltage + Talon=??????

So my team needs a PID Controller code for our shooter. All the example code shows this:

Code:
	Joystick turretStick(1);
	Jaguar turretMotor(1);
	AnalogChannel turretPot(1);
	PIDController turretControl(0.1, 0.001, 0.0, &turretPot, &turretMotor);
	
	turretControl.Enable();  // start calculating PIDOutput values

	while(IsOperator())
   {
		turretControl.SetSetpoint((turretStick.GetX() + 1.0) * 2.5);
		Wait(.02);		// wait for new joystick values
	}
I cant find anything on using the battery voltage in that code or a talon. Also I read that the speed controllers have a trype of built in PID Loop. One more thing to the the battery volts we are using:

Code:
float volt
.
.
. 
volt = DriverStation::GetInstance()->GetBatteryVoltage();
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


All times are GMT -5. The time now is 10:39.

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