View Single Post
  #3   Spotlight this post!  
Unread 02-24-2016, 02:07 PM
VrewDaive VrewDaive is offline
Registered User
FRC #4284
 
Join Date: Sep 2015
Location: Cincinnati
Posts: 21
VrewDaive is an unknown quantity at this point
Re: Pneumatics not working

This is what our team is using, tell me if it works ( youll have to set the solenoids to whatever yours is named.
Code:
DS.set(DoubleSolenoid.Value.kOff); // sets both Solenoids to off at the beginning of Teleop. 
	    	DS1.set(DoubleSolenoid.Value.kOff);// ^




  if(moveStick.getRawButton(1)) // A Button
	    		   {
	    			   DS1.set(DoubleSolenoid.Value.kReverse); // Lowers pistons to raise robot up
	    			  // DS1.set(DoubleSolenoid.Value.kReverse);
	    		   }
	    		   else 
	    			   if(moveStick.getRawButton(4)) // Y Button
	    			   {
	    				   DS1.set(DoubleSolenoid.Value.kForward); // raises pistons to prepare for ascension
		    			  // DS1.set(DoubleSolenoid.Value.kForward); 
	    				   
	    			   }
basically the solenoids are off at the beginning and only if the button is pressed will the direction of the solenoids change. hope this helps!!
Reply With Quote