Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Pneumatics (http://www.chiefdelphi.com/forums/forumdisplay.php?f=54)
-   -   Pneumatic Compressor not starting up (http://www.chiefdelphi.com/forums/showthread.php?t=103196)

Twisted eric 18-02-2012 16:02

Pneumatic Compressor not starting up
 
This is the third day I have been at this (working on pneumatics).

Now the compressor is attached to a spike, then the spike is connected to the power distribution board both 20amp breakers. The spike is connected to the digital sidecar in relay slot 1 (sig [a], pow[b], ground[-]). And the pressure switch is connected to Digital I/O 1 (Black on Nc, Red on C).

Code:


package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Watchdog;

public class RobotTemplate extends SimpleRobot {

    private static final long TIME_DELAY = 1000; //in milliseconds
    Joystick leftStick = new Joystick(1);
    Joystick rightStick = new Joystick(2);
    Joystick three = new Joystick(3);
    Jaguar rightF = new Jaguar(2);
    Jaguar rightB = new Jaguar(1);
    Jaguar leftF = new Jaguar(3);
    public Jaguar leftB = new Jaguar(4);
    public Compressor fluffy = new Compressor(1, 1, 1, 1);
    DriverStation ds;
    Watchdog fenrir = Watchdog.getInstance();

 

    void drive() {
        if (leftStick.getRawButton(1)) {
            leftF.set(-1.0);
            rightB.set(1.0);
            leftB.set(1.0);
            rightF.set(-1.0);
        } else {
            if (rightStick.getRawButton(1)) {
                leftF.set(1.0);
                rightB.set(-1.0);
                leftB.set(-1.0);
                rightF.set(1.0);
            } else {
                leftF.set(leftStick.getY());
                rightB.set(rightStick.getY() * -1);
                leftB.set(leftStick.getY());
                rightF.set(rightStick.getY() * -1);

            }
        }

    }

    void com() {
        fenrir.feed();
        if (fluffy.getPressureSwitchValue()) {
            fluffy.setRelayValue(Relay.Value.kOff);
        } else {
            fluffy.setRelayValue(Relay.Value.kOn);

        }
    }

    public void autonomous() {
        fenrir.feed();
    }

    public void operatorControl() {
        while (true && isOperatorControl() && isEnabled()) {
            fenrir.feed();
            com();
            drive();
        }
    }
}

Here is he code I went over a ton of times and can't see anything wrong with it. Help please.


All times are GMT -5. The time now is 16:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi