Go to Post I was outvoted by conservative teenagers (curse them...). - Rick TYler [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-01-2008, 16:31
cardinalman86's Avatar
cardinalman86 cardinalman86 is offline
0001 0101 0010 1001 System Lead!!
AKA: Corey
FRC #1529
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Southport,Indiana
Posts: 112
cardinalman86 will become famous soon enough
Send a message via Yahoo to cardinalman86
EasyC/IR problems in Autonomous

Hey, we have our program here and it works in Operator Interface, but not Autonomous. We just thought u guys could look at it and help us make it work. Thanks.

We want it so that when we press a button, it turns on the spike and moves the pistons for our pneumatics. The operator control works, but when we put the same thing in Auton it doesn't work.

http://whlspacedude.googlepages.com/piston.zip
__________________
Before you practice zen, a bowl is a bowl and a cup is a cup. During zen, a bowl is not a bowl and a cup is not a cup. After practicing zen, a bowl is a bowl and a cup is a cup.
  #2   Spotlight this post!  
Unread 18-01-2008, 13:38
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: EasyC/IR problems in Autonomous

Well, technically this shouldn't work in Operator Control or Autonomous. But Operator Control loops due to the way WPILIB is written. But, both you Autonomous and Operator Control should have a while() loop. Here is how it should look.

Code:
void Autonomous ( void )
{
      unsigned char IR1; 

      while ( 1 )
      {
            ir1 = GetDigitalInput ( 1 ) ;
            if ( ir1 == 1 )
            {
                  SetRelay ( 2 , 1 , -1 ) ;
                  Wait ( 10 ) ;
                  SetRelay ( 2 , 0 , -1 ) ;
            }
      }
}
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #3   Spotlight this post!  
Unread 22-01-2008, 15:50
cardinalman86's Avatar
cardinalman86 cardinalman86 is offline
0001 0101 0010 1001 System Lead!!
AKA: Corey
FRC #1529
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Southport,Indiana
Posts: 112
cardinalman86 will become famous soon enough
Send a message via Yahoo to cardinalman86
Re: EasyC/IR problems in Autonomous

Gracious senor, we've got it working, just to give you an update.
__________________
Before you practice zen, a bowl is a bowl and a cup is a cup. During zen, a bowl is not a bowl and a cup is not a cup. After practicing zen, a bowl is a bowl and a cup is a cup.
Closed Thread


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
Gyro Autonomous Problems cprogrammer Programming 5 23-03-2007 14:28
multiple autonomous modes using easyc cerberus170 Programming 3 20-02-2007 15:01
CMUCam problems with EasyC Kickoff demo code Team 562 Programming 4 14-02-2007 14:27
EasyC: Execute code before autonomous Greg Marra Programming 7 07-01-2007 21:30
EasyC autonomous modes TubaMorg Programming 25 12-04-2006 22:53


All times are GMT -5. The time now is 18:33.

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