View Single Post
  #7   Spotlight this post!  
Unread 13-02-2009, 20:13
z2daj z2daj is offline
Registered User
FRC #2836 (Team Beta)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Bethlehem, CT
Posts: 15
z2daj is an unknown quantity at this point
Send a message via AIM to z2daj
Re: Inputs on Driver Station

oh wow, ha. thank you so much! yea that clears things up a lot now here's one more question... how would we get rotary encoders working? we bought ours from digikey m/n EM14 - 14 ; since we were missing a key component to the ones supplied to us in the KoP. we're not too sure on the coding for the encoders, everything we have tried has ended with Red Error Messages of Demise (REMoD) and any console outputs are 0. this is what we have for our code:

Code:
#include "Encoder.h"

class RobotDemo : public SimpleRobot

{

		Encoder rotary;

public:

	RobotDemo(void):

		rotary(1, 2)

void Autonomous(void)

	{
		gyro.Reset();

		int display;
				
		
		while (IsAutonomous())

		{
		
			float anything;
			
			while(argument)

			{

				GetWatchdog().SetEnabled(false);	
			
				rotary = new Encoder(1,2);

				Wait(0.004);	
			
				display = rotary;

				printf (" %d \n ", display);

			}

           }

}

void OperatorControl(void)
{

}

};

any ideas?
__________________
There is nothing to fear, but fear itself

Last edited by z2daj : 13-02-2009 at 20:14. Reason: code was hard to read
Reply With Quote