|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
edu.wpi.first.wpilibj.Solenoid
public class Solenoid
Solenoid class for running high voltage Digital Output (9472 module). The Solenoid class is typically used for pneumatics solenoids, but could be used for any device within the current spec of the 9472 module.
Field Summary |
---|
Fields inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
kAnalogChannels, kAnalogModules, kChassisSlots, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond |
Constructor Summary | |
---|---|
Solenoid(int channel)
Constructor. |
|
Solenoid(int slot,
int channel)
Constructor. |
Method Summary | |
---|---|
protected void |
free()
Destructor. |
boolean |
get()
Read the current value of the solenoid. |
static byte |
getAll()
Read the current value of all solenoids. |
void |
set(boolean on)
Set the value of a solenoid. |
static int |
slotToIndex(int slot)
Convert slot number to index. |
Methods inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Solenoid(int channel)
channel
- The channel on the module to control.public Solenoid(int slot, int channel)
slot
- The slot that the 9472 module is plugged into.channel
- The channel on the module to control.Method Detail |
---|
protected void free()
free
in class SensorBase
public static int slotToIndex(int slot)
slot
- The slot in the chassis where the module is plugged in.
public void set(boolean on)
on
- Turn the solenoid output off or on.public boolean get()
public static byte getAll()
|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |