View Single Post
  #8   Spotlight this post!  
Unread 24-01-2012, 17:14
meltbox360 meltbox360 is offline
Registered User
FRC #4302
 
Join Date: Jan 2012
Location: Chicago, Il
Posts: 32
meltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of lightmeltbox360 is a glorious beacon of light
Re: Jaguar Blinking Yellow

I rechecked all the wiring and everything is correct. I'm not sure what the lights next to "RELAY" on the sidecar signify but they light up. Sometimes one of them is not lit up though. The motor controller continues to blink just as before. I will post my code here, perhaps someone can find something I did wrong.

Code:
#include "WPILib.h"

class WRobot : public SimpleRobot
{
	Jaguar WMotor;
	
public:
	WRobot(void):WMotor(2,1)
	{
		//WMotor.SetExpiration(0.1);
	}
	
	~WRobot(void)
	{
	}
	
	void Autonomous(void)
	{
		WMotor.Set(1);
		Wait(2.0);
		WMotor.Set(0);
		WMotor.Disable();
	}
	
	void Disabled(void)
	{
		WMotor.Set(1);
		Wait(2.0);
		WMotor.Set(0);
		WMotor.Disable();
	}
	
	void OperatorControl(void)
	{
		WMotor.Set(1);
		Wait(2.0);
		WMotor.Set(0);
		WMotor.Disable();
	}
	
	void RobotInit(void)
	{
		WMotor.Set(1);
		Wait(2.0);
		WMotor.Set(0);
		WMotor.Disable();
	}
	
	void RobotMain(void)
	{
		WMotor.Set(1);
		Wait(2.0);
		WMotor.Set(0);
		WMotor.Disable();
	}
	
	void StartCompetition(void)
	{
		WMotor.Set(1);
		Wait(2.0);
		WMotor.Set(0);
		WMotor.Disable();
	}
	
};

START_ROBOT_CLASS(WRobot);
The only other thing I can think of is possibly flashing the motor controllers but it did not say to do that unless you are using CAN.

EDIT: Just a note on the commented SetExpiration. I did have that in the code at one point. I commented it as it was unclear to me exactly what it did but I was just trying a few things.

Last edited by meltbox360 : 24-01-2012 at 18:40.
Reply With Quote