Go to Post GP isn't just a good idea, it's mathematically optimal. - Jared Russell [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
  #4   Spotlight this post!  
Unread 14-01-2012, 11:54
Team 3705's Avatar
Team 3705 Team 3705 is offline
Registered User
FRC #3705
 
Join Date: Jan 2011
Location: Canada
Posts: 34
Team 3705 is an unknown quantity at this point
Re: Need help coding the jaguars

Hmm we are having problems also programming our robot.
Code:
 
#include "WPILib.h"

/**
 * This is a demo program showing the use of the RobotBase class.
 * The SimpleRobot class is the base of a robot application that will automatically call your
 * Autonomous and OperatorControl methods at the right time as controlled by the switches on
 * the driver station or the field controls.
 */ 
class RobotDemo : public SimpleRobot
{
	RobotDrive myRobot; // robot drive system
	Joystick leftstick; // "leftstick" is a variable that points to the joystick object.
	
	Jaguar *gripperMotor;
public:
	RobotDemo(void):
		myRobot(1, 2),	// these must be initialized in the same order
		leftstick(1)
				// as they are declared above.
	{
		Joystick *rightstick;
		myRobot.SetExpiration(0.1);
	}

	/**
	 * Drive left & right motors for 2 seconds then stop
	 */
	void Autonomous(void)
	{
		myRobot.SetSafetyEnabled(false);
		myRobot.Drive(0.5, 0.0); 	// drive forwards half speed
		Wait(2.0); 				//    for 2 seconds
		myRobot.Drive(0.0, 0.0); 	// stop robot
	}

	/**
	 * Runs the motors with arcade steering. 
	 */
	void OperatorControl(void)
	{
		myRobot.SetSafetyEnabled(true);
		while (IsOperatorControl())
		{
			myRobot.ArcadeDrive(leftstick); // drive with arcade style (use right stick)
			Wait(0.005);
			
			
		}
	}
};

START_ROBOT_CLASS(RobotDemo);
This is for our 2011 robot.
We have not been able to get Autonomous nor Operator control going. We are constantly bombarded with an error about the digital module not being found, and something at line 26 of PWM.cpp.

When we try autonomous or teleoperated nothing occurs.The robot does not move or anything.

Last edited by Team 3705 : 14-01-2012 at 12:11.
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:49.

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