Quote:
Originally Posted by rkoripalli
In terms of code, I am using Java commandbase. I have "public static Relay cannon = new Relay(4);" in RobotMap. I also have a command setup to fire. In the initialize i'm doing "RobotMap.cannon.set(Relay.Value.kOn);" where cannon is the name of the Relay and RobotMap is the place where it is defined. I can verify that the command is running because I have a debug statement which is printing when I push the button to run it.
|
Using kOn is turning both sides of the relay on, which won't cause the solenoid to fire. You want to use kForward which sets the + side to 12v and the - side to ground.
Alternately, you can set the direction to forward in the constructor and then use kOn.