Go to Post many of the greatest innovation throughout history have come from people who have ignored standard practices and traditional thinking. - jason701802 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 24-02-2016, 14:07
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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:34.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi