Quote:
Originally Posted by peng432
Hi,
Our team recently lost the majority of its programmers and where switching over to Java, i understand java a little and where using robot builder to make it a bit easier. My question is how do you code pneumatic's in general and even then how would you use that in robot builder? I lurked a little to try and find out but my adventure didn't give me anything. So any help would be Greatly appreciated!!
|
You'll want to create a Solenoid first.
Code:
Solenoid solenoid1 = new Solenoid(1);
Then you'll want to tell the solenoid to activate.
Code:
solenoid1.set(true);
Or deactivate.
Code:
solenoid1.set(false);
If you have a double acting cylinder you'll need teo solenoids and active and deactivate them opposite of each other, or use a DoubleSolenoid.