Go to Post So, we should have respect for each other regardless of whether we are building our robot with a Waterjet or a Hacksaw. Construction methods will vary widely, but honoring your competitors should be universal. - OZ_341 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 05-02-2008, 19:31
ShotgunNinja's Avatar
ShotgunNinja ShotgunNinja is offline
Programming Mentor, FRC 4247
AKA: Nicholas Iannone
FRC #4247 (CougarBOTS)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Milwaukee, WI
Posts: 160
ShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the roughShotgunNinja is a jewel in the rough
Automated Air Compressor code

In case anyone needed some help with putting on an automated air compressor, here is some code that may be able to help. In order to use this, you would need a single pressure switch attached to a relay and an input, and a relay for the air compressor.

In Initialize:
Code:
InitPressureSwitch(psInput, psRelay);
And in a new function:
Code:
void PressureSwitch(void)
{
   unsigned char pswitch;

   pswitch = GetDigitalInput(psInput);
   if (pswitch)
   {
      SetRelay(airpump, 1, 0);
   }
   else
   {
      SetRelay(airpump, 0, 0);
   }
}
You also need to appropriately set the values of airpump, psInput, and psRelay.
__________________
Team #2970 Alum
Team #1652 Alum
2006: School Mascot for Team 1652
2007-2008: Programmer for Team 1652 (Robot Mafia)
2009: Programmer on Team 1652 (Robot Mafia), Programmer on Team 2970 (eSchool eBots)
2010-2016: Volunteer, Wisconsin Regional
2017: Programming Mentor, FRC 4247 (CougarBOTS, Obama SCTE, Milwaukee, WI)
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
AIR COMPRESSOR !!! edgar_amaro Pneumatics 11 05-02-2008 00:43
Air Compressor Question Jrocklz Pneumatics 4 17-01-2008 21:36
Air Compressor Wireing question Bochek General Forum 7 11-01-2007 21:34
Off robot air compressor sanddrag Rules/Strategy 52 11-01-2007 15:11
Air Compressor geo Technical Discussion 4 06-02-2002 22:52


All times are GMT -5. The time now is 23:47.

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