Solenoid¶
- class wpilib.Solenoid(*args, **kwargs)[source]¶
Bases: wpilib.SolenoidBase
Solenoid class for running high voltage Digital Output.
The Solenoid class is typically used for pneumatics solenoids, but could be used for any device within the current spec of the PCM.
Constructor.
Arguments can be supplied as positional or keyword. Acceptable positional argument combinations are:
- channel
- moduleNumber, channel
Alternatively, the above names can be used as keyword arguments.
Parameters: - moduleNumber (int) – The CAN ID of the PCM the solenoid is attached to
- channel (int) – The channel on the PCM to control (0..7)
- get()[source]¶
Read the current value of the solenoid.
Returns: The current value of the solenoid. Return type: bool