View Single Post
  #7   Spotlight this post!  
Unread 03-01-2016, 01:33 PM
FRC3220 FRC3220 is offline
Registered User
no team
 
Join Date: Feb 2016
Location: Spangle
Posts: 11
FRC3220 is an unknown quantity at this point
Re: Motors/solenoids won't work; Can't print to console

I got the solenoids working. The motors are wired into the spike relays, and the spikes are wired into the power distribution board and the Relay ports on the roboRIO. We're pretty sure that our spikes are broken somehow. I wrote this block that should just turn on the motors and leave them spinning as long as TeleOp is enabled. I've tried a few variations of this, and the motors still won't turn on. Logic dictates that if the relays were working, they'd be continuously running, right?

Code:
void TeleopPeriodic()
	{
		shooter_motors.Set(Relay::kOn);  
		arm_rotator.Set(Relay::kOn);
		if (true) {
			cout << "A motor should be on" << endl;
			shooter_motors.Set(Relay::kForward);
			arm_rotator.Set(Relay::kForward);
		}

		myRobot.ArcadeDrive(stick);
	}
Reply With Quote