CTE Pneumatics#

Introduction#

CTE Pneumatic commands will only work with the CTE Pneumatic parts. You will need to manually import the CTE module in order for this to work:

from cte import *

The VEX V5 Brain can control the CTE Pneumatic system using methods from the Pneumatic class. These methods allow the Brain to control the pneumatic pump and extend or retract pneumatic cylinders.

This page uses cte_pneumatic as the example CTE Pneumatics name. Replace it with your own configured name as needed.

Below is a list of available methods:

Actions – Control pneumatic cylinders and the pneumatic pump.

  • extend – Extends a pneumatic cylinder.

  • retract – Retracts a pneumatic cylinder.

  • pump_on – Turns the pneumatic pump on.

  • pump_off – Turns the pneumatic pump off.

Setters – Turn the pneumatic pump on or off.

  • pump – Turns the pneumatic pump on or off.

Constructors – Manually initialize and configure the CTE Pneumatic Solenoid.

  • Pneumatic – Create a CTE Pneumatic Solenoid.

Actions#

extend#

extend extends a pneumatic cylinder.

Usage:
cte_pneumatic.extend(cylinder)

Parameters

Description

cylinder

The cylinder to extend:

  • CYLINDER1
  • CYLINDER2
  • CYLINDER3
  • CYLINDER4
  • CYLINDERALL – All 4 cylinders

retract#

retract retracts a pneumatic cylinder.

Usage:
cte_pneumatic.retract(cylinder)

Parameters

Description

cylinder

The cylinder to retract:

  • CYLINDER1
  • CYLINDER2
  • CYLINDER3
  • CYLINDER4
  • CYLINDERALL – All 4 cylinders

pump_on#

pump_on turns the pneumatic pump on.

Usage:
cte_pneumatic.pump_on()

Parameters

Description

This method has no parameters.

pump_off#

pump_off turns the pneumatic pump off.

Usage:

cte_pneumatic.pump_off()

Parameters

Description

This method has no parameters.

Setters#

pump#

pump turns the pneumatic pump on or off.

Usage:

cte_pneumatic.pump(state)

Parameters

Description

state

The state to set: True turns the pneumatic pump on, and False turns the pneumatic pump off.

Constructors#

Constructors are used to manually create Pneumatic objects, which are necessary for configuring a CTE Pneumatic Solenoid.

Pneumatic#

Pneumatic creates a CTE Pneumatic Solenoid.

Usage:
Pneumatic(smartport)

Parameter

Description

smartport

The Smart Port that the CTE Pneumatic Solenoid is connected to, written as Ports.PORTx where x is the number of the port.

from cte import *

# Create a CTE Pneumatic Solenoid in Port 1
cte_pneumatic = Pneumatic(Ports.PORT1)