View Single Post
  #1   Spotlight this post!  
Unread 14-02-2013, 20:38
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: Relays not working

You are missing the line
myRobot(1,2)
Under
RobotDemo(void):

and above
feeder(5, Relay::kForwardOnly)

That initializes the robot drive and the feeder

Code:
class RobotDemo : public SimpleRobot
{	
	RobotDrive myRobot; // robot drive syste0m
	Relay feeder;
	
public:
	RobotDemo(void):
                           myRobot(1,2),
		feeder(5, Relay::kForwardOnly)

	void OperatorControl(void)
	{
		while (IsOperatorControl()){
			
	
		           feeder.Set(Relay::kForward);
		}
	}
__________________
Brian K
Team 1225 Robotics Mentor
Reply With Quote