View Single Post
  #2   Spotlight this post!  
Unread 17-02-2008, 22:33
lasereyes's Avatar
lasereyes lasereyes is offline
College Student Mentor
AKA: Farzin Fatollahi-Fard
FRC #2551 (Penguin Empire)
Team Role: Alumni
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Novato, CA
Posts: 114
lasereyes is an unknown quantity at this point
Send a message via AIM to lasereyes
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.
Attached Thumbnails
Click image for larger version

Name:	digitaloiinput.JPG
Views:	102
Size:	116.5 KB
ID:	6305  
__________________
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!)