View Single Post
  #1   Spotlight this post!  
Unread 18-02-2008, 15:55
program1's Avatar
program1 program1 is offline
Registered User
AKA: RJ
FRC #2441
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Maryknoll
Posts: 43
program1 will become famous soon enough
programming pneumatics problem

we tried to load this program and after it finishes, the program does nothing, the spike we set the double compressor turns green but nothing happens,

heres our code we used:

char flag00 = 1;
char flag01 = 1; //set at top of program

if(p2_sw_trig == 1 && flag00 == 1)
{
relay6_fwd = 1;
relay6_rev = 0;
flag01 = 0;
}
else if(p2_sw_trig == 1 && flag00 == -1)
{
relay6_fwd = 0;
relay6_rev = 1;
flag01 = 0;
}
else if (p2_sw_trig == 0 && flag01 == 0)
{
flag01 = 1;
flag00 = flag00 * -1;
}

is there any problems within the program?
__________________
ok, who ate my hot pocket?