![]() |
Compressor programming
#include "WPILib.h"
#include "Vision/AxisCamera.h" #include "Vision/HSLImage.h" #include "DriverStationLCD.h" //#include "AxisCamera.h" //#include "FrcError.h" #include "Vision/PCVideoServer.h" #include "Compressor.h" class RobotDemo : public SimpleRobot { RobotDrive myRobot; // robot drive system Joystick leftjoy; Joystick rightjoy; Joystick armjoy; Jaguar arm; Relay piston; Relay compressor; DigitalInput compressor_switch; DigitalInput limitswitch_foward; DigitalInput limitswitch_reverse; Servo x_axis; Servo y_axis; myRobot(1, 2), leftjoy(1), rightjoy(2), armjoy(3), arm(3), piston(4), compressor(5), compressor_switch(1), limitswitch_foward(2), limitswitch_reverse(3), x_axis(10), y_axis(9) { GetWatchdog().SetExpiration(1.00); } void OperatorControl(void) compressor.Set(Relay::kOn); Ok this is everything in my code that is relevant to the compressor can you please help me to understand why it is not turning? because i want to get a pressure switch to turn the compressor off when its at 115 but its not working, so when i manually set it to turn on using a button, it wont stop at 115 please help |
Re: Compressor programming
Check out the Compressor class in WPILib. It takes a pressure switch and a relay as an input and automatically controls the air pressure.
|
| All times are GMT -5. The time now is 17:46. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi