|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: How do you program limit switches?
Scissor jack? Very suave just to think of it.
|
|
#2
|
|||
|
|||
|
Re: How do you program limit switches?
Yup! We use it to change the angle of our shooter.
|
|
#3
|
||||
|
||||
|
Re: How do you program limit switches?
|
|
#4
|
|||
|
|||
|
Re: How do you program limit switches?
For some of you using command based programming, I noticed that the DigitalIOButton class wasn't working properly, so I programmed my own DigitalButton class using the very-functional DigitalInput class.
Code:
public class DigitalButton extends Button {
private int channel;
DigitalInput buttonInput;
public DigitalButton(int channel) {
this.channel = channel;
buttonInput = new DigitalInput(channel);
}
public int getChannel() {
return this.channel;
}
public boolean get() {
return buttonInput.get();
}
}
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|