View Single Post
  #2   Spotlight this post!  
Unread 17-02-2011, 22:51
QRohlf's Avatar
QRohlf QRohlf is offline
Registered User
FRC #1823 (PING)
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Portland, OR
Posts: 7
QRohlf is an unknown quantity at this point
Re: help needed with code for pneumatics

First off, you should really be asking the person who wrote the code. They should be on your team, and it's their responsibility to provide the team with documentation.

With that said, I'll help you out.

Quote:
private Compressor compressor = new Compressor(1,2);
private Solenoid pistonUp = new Solenoid(5);
private Solenoid pistonDown = new Solenoid(6);
Is what you're looking for.

Quote:
private Compressor compressor = new Compressor(1,2);
Means that the pressure sensor should be plugged into Digital IO 1, and the 3-pin cable for the compressor's spike should be plugged into Relay 2.

Quote:
private Solenoid pistonUp = new Solenoid(5);
private Solenoid pistonDown = new Solenoid(6);
Means that your up piston solenoid should be plugged into port 5 on the analog breakout module (NOT the digital sidecar), and your down piston solenoid should be plugged into port 6 on the same module.
Reply With Quote