Hey, I am from team 4590.
We are having trouble with the compressor- it does nothing.
The pressure switch is connected to DigitalInput 1 and the Spike to Relay 2.
This is our full simple code:
note: when we use the Relay.Set() function (and don't use the Compressor class at all) the compressor works.
Code:
#include "WPILib.h"
class RobotDemo : public SimpleRobot
{
Joystick stick;
Compressor comp;
public:
RobotDemo(void):
stick(1),
comp(1,2)
{
comp.Start();
}
void Autonomous(void)
{
Wait(2.0);
}
void OperatorControl(void)
{
while (IsOperatorControl())
{
Wait(0.005);
}
}
void Test() {
}
};
START_ROBOT_CLASS(RobotDemo);