Newbie How to control a spike

In our code for a tshirt cannon (Im a freshman and get all the bad jobs) I was tasked with making the relay (Spike) shoot the actual cannon. I have no idea. I tinkered and set this up like so:

Subsystem
package org.usfirst.frc.team2141.robot.subsystems;

import org.usfirst.frc.team2141.robot.RobotMap;
import org.usfirst.frc.team2141.robot.commands.CannonControl;

import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.Relay.Direction;
import edu.wpi.first.wpilibj.Relay.Value;
import edu.wpi.first.wpilibj.command.Subsystem;

/**
*
*/
public class Cannon extends Subsystem {

Relay cannonFire;


public Cannon() {
	
	cannonFire = new Relay(RobotMap.CANNON_CHANNEL);
	
}


public void cannonFire() {
		cannonFire.set(Value.kOn);
		
}
// Put methods for controlling this subsystem
// here. Call these from Commands.

public void initDefaultCommand() {
    // Set the default command for a subsystem here.
    //setDefaultCommand(new MySpecialCommand());
	setDefaultCommand(new CannonControl());
}

}

Command
package org.usfirst.frc.team2141.robot.commands;

import org.usfirst.frc.team2141.robot.OI;
import org.usfirst.frc.team2141.robot.Robot;

import edu.wpi.first.wpilibj.command.Command;

/**
*
*/
public class CannonControl extends Command {

public CannonControl() {
    // Use requires() here to declare subsystem dependencies
    // eg. requires(chassis);
	requires(Robot.cannon);
}

// Called just before this Command runs the first time
protected void initialize() {
}

// Called repeatedly when this Command is scheduled to run
protected void execute() {
	if (Robot.oi.getButtons()[5].get()) {
		Robot.cannon.cannonFire();
}}

// Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() {
    return false;
}

// Called once after isFinished returns true
protected void end() {
}

// Called when another command which requires one or more of the same
// subsystems is scheduled to run
protected void interrupted() {
}

}

What am I doing wrong?

What is the problem exactly? When you run the command does the LED on the Spike change? Does the code deploy properly? More information would be helpful for solving the problem. Also put your code in code tags to make it more readable:

Example

Sorry didnt know how to do tags

No the spike stays in neutral (orange)

Do not name your spike object and the cannonFire() method the same thing. I’d change the spike name to cannonSpike if I were you but do whatever suits you best. Also, you will need to call that method (cannonFire) from something. But you will need to create a joystick instance to have a button to press. In your Robot.java file, create an instance of a joystick. To do this, add this line after the “public class Robot extends ___” line:

Joystick stick;

Add this line after the “public Robot()” (constructor) line:

stick = new Joystick(0); // new joystick on port 0. Change this if you wish

Then, when you press button 5 on the joystick you will want the code to run the method inside the Cannon subsystem. Add the following lines under the operatorControl method:

  if(stick.getRawButton(5) == true){
            	Cannon.cannonFire();
            }

This should get you all set from there in terms of programming. You can remove the Command file if you so desire.