View Single Post
  #1   Spotlight this post!  
Unread 14-02-2013, 15:33
e10 e10 is offline
Registered User
FRC #3949
 
Join Date: Nov 2012
Location: Brampton
Posts: 5
e10 is an unknown quantity at this point
Relays not working

We are having an issue getting our relays to work. We are using a spike relay to move a motor. We believe everything is connected correctly, as the light on the relay is on. Thus we think the problem is in our code:

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

	void OperatorControl(void)
	{
		while (IsOperatorControl()){
			
                                     feeder.Set(Relay::kOn);	
		           feeder.Set(Relay::kForward);
		}
	}
Reply With Quote