|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 |
|
#2
|
||||
|
||||
|
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 ) ;
}
}
}
|
|
#3
|
||||
|
||||
|
Re: EasyC/IR problems in Autonomous
Gracious senor, we've got it working, just to give you an update.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |