Skip to content

2f. Compressor

Jordan edited this page Sep 2, 2021 · 13 revisions

Exercise proper precautions when handling compressors! Compressors get hot- wear safety gloves when handling a compressor that has been in operation.

When mounting the compressor on the robot, try to dampen the vibrations of the compressor.

Overview

A compressor compresses air and stores the compressed air in the reservoir. The pressure is around 120psi, but the lower system will use 60psi. Lower the psi for a slower/weaker piston.

What you need

A compressor hooked up to the Pneumatic Control Module (PCM).

Code

Remember to call the constructer to make a new Compressor object.

Compressor c = new Compressor();

Important methods to call

c.setClosedLoopControl(true); //automatically turn on and off the compressor depending on pressure
// this usually works well enough, so don't change this unless experimenting. 

c.start(); //start the compressor
c.stop(); //stop the compressor
c.enabled(); //returns true if compressor is on
c.getPressureSwitchValue(); //check the outgoing pressure

Resources

Clone this wiki locally