Go to Post Only a few more days till i get to see her again! This is sad you would think I was talking about a chick... no wonder my gf gets jealous. XD - sportzkrazzy [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-25-2015, 02:47 PM
thatprogrammer's Avatar
thatprogrammer thatprogrammer is offline
Registered User
AKA: Ahad Bawany
no team (None)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Florida
Posts: 608
thatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond repute
Cheesy Drive in Iterative Robot?

Hey, would someone mind posting sample code for cheesy drive in iterative robot? I tried coding this, but can't seem to get it to work. If possible, provide code using the old talons.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-25-2015, 02:56 PM
thatprogrammer's Avatar
thatprogrammer thatprogrammer is offline
Registered User
AKA: Ahad Bawany
no team (None)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Florida
Posts: 608
thatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond reputethatprogrammer has a reputation beyond repute
Re: Cheesy Drive in Iterative Robot?

Here is the code I used
Code:
class Robot: public IterativeRobot
{
private:
    RobotDrive *myrobot;
	LiveWindow *lw;
	Talon *kFrontLeftMotor;
	Talon *kBackLeftMotor;
	float turning;
	float straight;
	Joystick *Driver;
	float frontMultiplier;
	float backMultiplier;
    Solenoid *shifter;
	void RobotInit()
	{
myrobot = new RobotDrive (0,1);
		lw = LiveWindow::GetInstance()
		kFrontLeftMotor = new Talon (0);
		kBackLeftMotor = new Talon(1);
		Driver = new Joystick (0);
		turning = Driver->GetRawAxis(3);
		straight = Driver->GetX();
		frontMultiplier = turning + straight;
		backMultiplier = turning - straight;
		

	}

	void AutonomousInit()
	{

	}

	void AutonomousPeriodic()
	{

	}

	void TeleopInit()
	{


	}


	void TeleopPeriodic()
	{
   
        	if( ( frontMultiplier > 1 ) || ( frontMultiplier < -1 ) )
        	{
        	frontMultiplier = ((0.0 < frontMultiplier) - (frontMultiplier < 0.0));
        	}




    	kFrontLeftMotor->Set (frontMultiplier);
    	kBackLeftMotor->Set (backMultiplier);

    }




	void TestPeriodic()
	{
		lw->Run();
	}
};

START_ROBOT_CLASS(Robot);
Reply With Quote
Reply


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 09:12 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