|
Re: Compressor Not Starting
OK, so there are two things you can try.
First just validate the relay works.
Create a Relay object on the relay port you have set up.
Then in the init just set it on. You can even use another relay channel as the digital side card will light up when the relay activates.
Relay r1 = new Relay( 1 );
r1.setDirection( kForward ) (may need Relay.kForward)
If that turns your compressor on then you know that part is working.
The other check you can do is validate you are getting single changes on the digital in.
DigitalInput di1 = new DigitalInput( 1 );
In the periodic routine for teleop print it out.
System.out.println( "digital 1 : " + di1.get() );
Then run and see if you connect the two terminals together on the pressure relay does the value change.
If both of those are working then I am not sure why it may not be working.
There is a teleopInit() you can add to the Iterative Robot class that will run once going into teleop mode, you can try the comp.start(); there.
So by running the relay directly you do not have the pressure sensor safety net, so either leave the relief valve open or only run it for a short time.
Randy
__________________
Randy Steiner
2014-2015 FIRST Team 5461 - Coach
2011-2014 FIRST Team 4106 - Head Mentor
2007-2011 FIRST Team 1891 - Mentor
|