Ya all the motors are working.
Here is a pic of the sidecar at the moment:
http://i58.tinypic.com/ohrara.jpg
The relay lights don't seem to be steady or blinking, but everything else seems to be fine.
I also changed the port to 7 for the spike on request of my team.
Code:
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.Relay;
public class RobotTemplate extends SimpleRobot {
RobotDrive chassis = new RobotDrive(1,2);
Joystick mainStick = new Joystick(1);
Jaguar jaguar = new Jaguar(3);
Jaguar jag = new Jaguar(4);
Compressor compressor = new Compressor(1, 1);
Relay spike = new Relay(7);
public void robotInit() {
compressor.start();
}
public void autonomous(){
chassis.setSafetyEnabled(false);
chassis.drive (-0.5, 0.08);
Timer.delay(2.0);
chassis.drive (0, 0.0);
}
public void operatorControl() {
chassis.setSafetyEnabled(true);
while (isOperatorControl() && isEnabled()) {
double speed = mainStick.getY();
double rot = -mainStick.getX();
chassis.arcadeDrive (speed, rot);
// Solenoid
spike.set(Relay.Value.kForward);
}
}
}