PneumaticHub

class wpilib.PneumaticHub(*args, **kwargs)

Bases: PneumaticsBase

Module class for controlling a REV Robotics Pneumatic Hub.

Overloaded function.

  1. __init__(self: wpilib._wpilib.PneumaticHub) -> None

Constructs a PneumaticHub with the default ID (1).

  1. __init__(self: wpilib._wpilib.PneumaticHub, module: int) -> None

Constructs a PneumaticHub.

Parameters:

module – module number to construct

class Faults

Bases: pybind11_object

class StickyFaults

Bases: pybind11_object

class Version

Bases: pybind11_object

property FirmwareFix
property FirmwareMajor
property FirmwareMinor
property HardwareMajor
property HardwareMinor
property UniqueId
checkAndReserveSolenoids(mask: int) int
checkSolenoidChannel(channel: int) bool
clearStickyFaults() None

Clears the sticky faults.

disableCompressor() None

Disables the compressor. The compressor will not turn on until EnableCompressorDigital(), EnableCompressorAnalog(), or EnableCompressorHybrid() are called.

enableCompressorAnalog(minPressure: pounds_per_square_inch, maxPressure: pounds_per_square_inch) None

Enables the compressor in analog mode. This mode uses an analog pressure sensor connected to analog channel 0 to cycle the compressor. The compressor will turn on when the pressure drops below minPressure and will turn off when the pressure reaches maxPressure.

Parameters:
  • minPressure – The minimum pressure. The compressor will turn on when the pressure drops below this value. Range 0 - 120 PSI.

  • maxPressure – The maximum pressure. The compressor will turn off when the pressure reaches this value. Range 0 - 120 PSI. Must be larger then minPressure.

enableCompressorDigital() None
enableCompressorHybrid(minPressure: pounds_per_square_inch, maxPressure: pounds_per_square_inch) None

Enables the compressor in hybrid mode. This mode uses both a digital pressure switch and an analog pressure sensor connected to analog channel 0 to cycle the compressor.

The compressor will turn on when a both:

  • The digital pressure switch indicates the system is not full AND

  • The analog pressure sensor indicates that the pressure in the system is

below the specified minimum pressure.

The compressor will turn off when a either:

  • The digital pressure switch is disconnected or indicates that the system

is full OR - The pressure detected by the analog sensor is greater than the specified maximum pressure.

Parameters:
  • minPressure – The minimum pressure. The compressor will turn on when the pressure drops below this value and the pressure switch indicates that the system is not full. Range 0 - 120 PSI.

  • maxPressure – The maximum pressure. The compressor will turn off when the pressure reaches this value or the pressure switch is disconnected or indicates that the system is full. Range 0 - 120 PSI. Must be larger then minPressure.

fireOneShot(index: int) None
get5VRegulatedVoltage() volts

Returns the current voltage of the regulated 5v supply.

Returns:

The current voltage of the 5v supply.

getAnalogVoltage(channel: int) volts

Returns the raw voltage of the specified analog input channel.

Parameters:

channel – The analog input channel to read voltage from.

Returns:

The voltage of the specified analog input channel.

getCompressor() bool
getCompressorConfigType() wpilib._wpilib.CompressorConfigType
getCompressorCurrent() amperes
getFaults() wpilib._wpilib.PneumaticHub.Faults

Returns the faults currently active on this device.

Returns:

The faults.

getInputVoltage() volts

Returns the current input voltage for this device.

Returns:

The input voltage.

getModuleNumber() int
getPressure(channel: int) pounds_per_square_inch

Returns the pressure read by an analog pressure sensor on the specified analog input channel.

Parameters:

channel – The analog input channel to read pressure from.

Returns:

The pressure read by an analog pressure sensor on the specified analog input channel.

getPressureSwitch() bool
getSolenoidDisabledList() int
getSolenoids() int
getSolenoidsTotalCurrent() amperes

Returns the total current drawn by all solenoids.

Returns:

Total current drawn by all solenoids.

getSolenoidsVoltage() volts

Returns the current voltage of the solenoid power supply.

Returns:

The current voltage of the solenoid power supply.

getStickyFaults() wpilib._wpilib.PneumaticHub.StickyFaults

Returns the sticky faults currently active on this device.

Returns:

The sticky faults.

getVersion() wpilib._wpilib.PneumaticHub.Version

Returns the hardware and firmware versions of this device.

Returns:

The hardware and firmware versions.

makeCompressor() wpilib._wpilib.Compressor
makeDoubleSolenoid(forwardChannel: int, reverseChannel: int) wpilib._wpilib.DoubleSolenoid
makeSolenoid(channel: int) wpilib._wpilib.Solenoid
reserveCompressor() bool
setOneShotDuration(index: int, duration: seconds) None
setSolenoids(mask: int, values: int) None
unreserveCompressor() None
unreserveSolenoids(mask: int) None