|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with Programming Pnuematics
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!! |
|
#2
|
|||||
|
|||||
|
Re: Help with Programming Pnuematics
Quote:
Code:
Solenoid solenoid1 = new Solenoid(1); Code:
solenoid1.set(true); Code:
solenoid1.set(false); |
|
#3
|
|||
|
|||
|
Re: Help with Programming Pnuematics
thanks for the reply,
Our team is using a double solenoid would the code still be the same or would their be any minor changes? |
|
#4
|
|||||
|
|||||
|
Re: Help with Programming Pnuematics
Quote:
Code:
DoubleSolenoid solenoid = new Solenoid(1, 2); solenoid.set(DoubleSolenoid.Value.kForward); Give that a try. You can also do something like: Code:
Solenoid solenoid1 = new Solenoid(1); Solenoid solenoid2 = new Solenoid(2); solenoid1.set(true); solenoid2.set(false); |
|
#5
|
||||
|
||||
|
Re: Help with Programming Pnuematics
Quote:
Code:
// Create a new DoubleSolenoid with the forward channel in port 1, // and the reverse channel in port 2 DoubleSolenoid doubleSolenoid = new DoubleSolenoid(1, 2); Code:
// Set the solenoid to the 'forward' position doubleSolenoid.set(DoubleSolenoid.Value.kForward); // Set the solenoid to the 'reverse' position doubleSolenoid.set(DoubleSolenoid.Value.kReverse); // Set the solenoid to the 'off' position doubleSolenoid.set(DoubleSolenoid.Value.kOff); |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|