|
Re: Relays Reversing On Their Own
I remember something from past experiences (I might be wrong), that the Tank control block and the OI to Relay (or OI to anything) shouldn't be 'placed in the same immediate loop'. I could be thinking of another problem, but I think you should try this:
Again, I'm not sure this would work, but try it anyway. Make a function and put in a 'Digital OI Input' and have it save to a variable (be careful, this var has to be an 'unsigned char'). Then have an If statement test to see if that variable == 1. Then put a SetRelay command and set it to forward. Following the If, i put an Else, and a SetRelay to set the relay to neutral.
I have an attachment picture which illustrates this.
I hope it helps.
__________________
FRC #2551 (FTC #646): Penguin Empire
2008 Rookie Team
2008 UC Davis Sacramento Regional Finalists (thanks to 1388, 1072, and 2390)
2008 UC Davis Sacramento Regional Highest Rookie Seed (#2!)
|