Go to Post I love talking to younger girls and inspiring them to become involved in more technical things. - Adrienne E. [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 Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   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
 


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 17:36.

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