Go to Post If you want to prove your worth, prove it by creation, not destruction. - DanL [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2011, 18:56
Tds123's Avatar
Tds123 Tds123 is offline
There is no I in team =]
AKA: Timothy Shub
FRC #1396 (Pyrobots)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Tottenville High School
Posts: 27
Tds123 is an unknown quantity at this point
Send a message via AIM to Tds123
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
__________________
ThE sCaLeS oF bAlAnCe (Team 1396)
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2011, 21:03
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,067
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
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.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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