Pneumatic#

Pneumatic commands will only work with the CTE Pneumatic parts.

To make Pneumatic commands appear in VEXcode V5, an Optical Sensor must be configured in the Devices window.

For more information, refer to this article:

Initializing the Pneumatic Class#

A Pneumatic System is created by using the following constructor:

Pneumatic(port)

This constructor use one parameter:

Parameter

Description

port

A valid Smart Port that the Pneumatic Solenoid is connected to.

# Construct a Pneumatic System "pneumatic_1" with the
# Pneumatic class.
pneumatic_1 = Pneumatic(Ports.Port1)

This pneumatic_1 object will be used in all subsequent examples throughout this API documentation when referring to Pneumatic class methods.

Class Methods#

open()#

The open() method sets the pneumatic valve to open.

Returns: None.

# Open the pneumatics for 2 seconds.
pneumatic_1.open()
wait(2, SECOND)

# Close the pneumatics.
pneumatic_1.close()

close()#

The close() method sets the pneumatic valve to close.

Returns: None.

# Open the pneumatics for 2 seconds.
pneumatic_1.open()
wait(2, SECOND)

# Close the pneumatics.
pneumatic_1.close()