OI causes errors when adding PID commands to buttons?

Hey, I was hoping someone could take a look at our code, we have never had a functioning PID before and this one appears to until we put it on a button in OI. Please let me know where I have messed up. Thanks!

code: https://github.com/Phred7/PIDArmTestsII/tree/master/src/org/usfirst/frc/team2906/robot

error ms:
ERROR Unhandled exception: java.lang.IllegalArgumentException: Subsystem must not be null. at [edu.wpi.first.wpilibj.command.Command.requires(Command.java:198), org.usfirst.frc.team2906.robot.commands.SetArmSetpoint.<init>(SetArmSetpoint.java:15), org.usfirst.frc.team2906.robot.commands.RaiseArm.<init>(RaiseArm.java:12), org.usfirst.frc.team2906.robot.OI.<init>(OI.java:54), org.usfirst.frc.team2906.robot.Robot.robotInit(Robot.java:43), edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:64), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:247)]
WARNING: Robots don’t quit!

You’re instantiating robot.oi, and thus the command, before robot.arm. The command references robot.arm, which, at the time of instantiation, is null, thus the exception.

This is one of the many really good reasons to avoid global variables (yes, I know, they’re how it’s done in screensteps - a lot of things are done badly in screensteps). One “better” way to do this, which we do in our code, is to pass subsystems to commands explicitly in their constructors (this can be used as a form of dependency-injection, which allows you to write more flexible code, as well).

Thank you it is working now. I expected it to be a little issue like that that I had overlooked