V5气动系统#
介绍#
The VEX V5 Brain can control a V5 Pneumatics system using methods from the Pneumatics class. These methods allow the Brain to open or close the system, extending or retracting pneumatic cylinders.
您需要手动创建类才能使其正常工作。
This page uses v5_pneumatic as the example V5 Pneumatics name. Replace it with your own configured name as needed.
以下是可用方法列表:
操作 – 控制气缸。
构造函数 - 手动初始化和配置 V5 气动电磁阀。
Pneumatics– Creates a V5 Pneumatics Solenoid.
行动#
open#
open extends a cylinder.
用法:
v5_pneumatic.open()
参数 |
描述 |
|---|---|
此方法没有参数。 |
# Extend the first cylinder
v5_pneumatic.open()
# Wait 2 seconds
wait(2, SECONDS)
# Retract the first cylinder
v5_pneumatic.close()
close#
close retracts a cylinder.
Usage:
v5_pneumatic.close()
参数 |
描述 |
|---|---|
此方法没有参数。 |
# Extend the first cylinder
v5_pneumatic.open()
# Wait 2 seconds
wait(2, SECONDS)
# Retract the first cylinder
v5_pneumatic.close()
构造函数#
Constructors are used to manually create Pneumatics objects, which are necessary for configuring a V5 Pneumatic Solenoid.
Pneumatics#
Pneumatics creates a V5 Pneumatics Solenoid.
Usage:
Pneumatics(port)
范围 |
描述 |
|---|---|
|
The 3-Wire Port that the V5 Pneumatic Solenoid is connected to:
|
# Create a V5 Pneumatic Solenoid in Port A
v5_pneumatic = Pneumatics(brain.three_wire_port.a)